|
# Do not install to system paths. |
|
for path in GLib.get_system_config_dirs(): |
|
for filename in directory_files: |
|
if filename.startswith(path): |
|
return True |
|
|
This function will determine the location of the folder to which the current desktop file belongs.
My desktop file is installed in the user directory, but it can belong to a folder created by the system
So this function will cause the installation to fail.
Although the default storage path of the desktop file is ~/.local/share/applications.
But it will not call the xdg-desktop-menu install command