From ef69d3b384fc9de1269d4304b3c1cd18555b2253 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 30 Mar 2011 13:05:33 +0200 Subject: [PATCH] Don't overwrite a /usr/share/applications/defaults.list symlink Canonicalize the defaults.list file name before overwriting it, to avoid replacing symlinks with files. Thanks to Joe Ebel for the original patch! https://bugs.freedesktop.org/show_bug.cgi?id=35794 --- scripts/xdg-desktop-menu | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/xdg-desktop-menu b/scripts/xdg-desktop-menu index dfa90b6..c308b41 100755 --- a/scripts/xdg-desktop-menu +++ b/scripts/xdg-desktop-menu @@ -687,7 +687,7 @@ make_lazy_default() # App already listed as default continue; fi - default_file="$1/defaults.list" + default_file="$(readlink -f "$1/defaults.list")" DEBUG 1 "Updating $default_file" grep -v "$MIME=" $default_file > ${default_file}.new 2> /dev/null if ! grep "[Default Applications]" ${default_file}.new > /dev/null; then -- 1.7.4.1