Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(763)

Unified Diff: scripts/xdg-mime.in

Issue 6928018: Linux: update xdg-utils to the latest git version and include a one-line fix in xdg-mime. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/xdg-utils/
Patch Set: '' Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « scripts/xdg-mime ('k') | scripts/xdg-open » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/xdg-mime.in
===================================================================
--- scripts/xdg-mime.in (revision 82218)
+++ scripts/xdg-mime.in (working copy)
@@ -145,9 +145,9 @@
DEBUG 2 "make_default_kde $vendor $mimetype"
DEBUG 1 "Updating $default_file"
mkdir -p "$default_dir"
- [ -f $default_file ] || touch $default_file
+ [ -f "$default_file" ] || touch "$default_file"
if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
- [ -f $default_file ] || touch $default_file
+ [ -f "$default_file" ] || touch "$default_file"
awk -v application="$vendor" -v mimetype="$mimetype" '
BEGIN {
prefix=mimetype "="
@@ -204,7 +204,7 @@
blanks--
}
}
-' $default_file > ${default_file}.new && mv ${default_file}.new $default_file
+' "$default_file" > "${default_file}.new" && mv "${default_file}.new" "$default_file"
eval 'kbuildsycoca4'$xdg_redirect_output
else
awk -v application="$vendor" -v mimetype="$mimetype" '
@@ -231,7 +231,7 @@
print "Preference=1"
print "ServiceType=" mimetype
}
-' $default_file > ${default_file}.new && mv ${default_file}.new $default_file
+' "$default_file" > "${default_file}.new" && mv "${default_file}.new" "$default_file"
fi
}
@@ -245,6 +245,7 @@
default_file="$xdg_user_dir/applications/mimeapps.list"
DEBUG 2 "make_default_generic $1 $2"
DEBUG 1 "Updating $default_file"
+ [ -f "$default_file" ] || touch "$default_file"
awk -v mimetype="$2" -v application="$1" '
BEGIN {
prefix=mimetype "="
@@ -292,7 +293,7 @@
blanks--
}
}
-' $default_file > ${default_file}.new && mv ${default_file}.new $default_file
+' "$default_file" > "${default_file}.new" && mv "${default_file}.new" "$default_file"
}
defapp_generic()
« no previous file with comments | « scripts/xdg-mime ('k') | scripts/xdg-open » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698