Providing arguments to xdg-desktop-menu with wildcards (not expanded by shell - either because of quoting, or missing files) expand them internally, but ignoring directory part of the argument. This results in operation on unrelated files. The most extreme case is: xdg-desktop-menu uninstall /nonexistent/*.directory /nonexistent/*.desktop This results in removing all files from /usr/share/desktop-directories and /usr/share/applications. While this behavior could be expected (if documented!) for just "*.desktop" argument, certainly it isn't when there was a full path provided. Looks like missing quoting here: uninstall) for x in $xdg_dir $kde_dir $gnome_dir ; do rm -f $x/$basefile # <- here done (this fragment appears twice in the script - once for directory files and once for desktop files) Version: xdg-utils 1.1.1 (Fedora 26). BTW I recommend running shellcheck on this (and other) script, it detects problems like this: In /usr/bin/xdg-desktop-menu line 1411: rm -f $x/$basefile ^-- SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/xdg-utils/issues/123.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.