~willismonroe/ubuntu/precise/xdg-utils/typo-fix-996304

« back to all changes in this revision

Viewing changes to debian/patches/xdg-update-menu-caonicalize-defaults.list.diff

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt, Martin Pitt, Scott Ritchie
  • Date: 2011-03-30 13:11:39 UTC
  • Revision ID: james.westby@ubuntu.com-20110330131139-dbnqh2z1d4lrlu68
Tags: 1.1.0~rc1-2ubuntu1
[ Martin Pitt ]
* Add xdg-update-menu-caonicalize-defaults.list.diff: Don't overwrite a
  /usr/share/applications/defaults.list symlink. Thanks to Joe Ebel for the
  original patch! (LP: #703106)

[ Scott Ritchie ]
* debian/patches/xdg-generic-use-mimetype.diff:
  - Update to fallback to generic on Gnome (LP: #602799)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From ef69d3b384fc9de1269d4304b3c1cd18555b2253 Mon Sep 17 00:00:00 2001
 
2
From: Martin Pitt <martin.pitt@ubuntu.com>
 
3
Date: Wed, 30 Mar 2011 13:05:33 +0200
 
4
Subject: [PATCH] Don't overwrite a /usr/share/applications/defaults.list symlink
 
5
 
 
6
Canonicalize the defaults.list file name before overwriting it, to avoid
 
7
replacing symlinks with files.
 
8
 
 
9
Thanks to Joe Ebel for the original patch!
 
10
 
 
11
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35794
 
12
Bug-Ubuntu: https://launchpad.net/bugs/703106
 
13
---
 
14
 scripts/xdg-desktop-menu |    2 +-
 
15
 1 files changed, 1 insertions(+), 1 deletions(-)
 
16
 
 
17
Index: xdg-utils-1.1.0~rc1/scripts/xdg-desktop-menu
 
18
===================================================================
 
19
--- xdg-utils-1.1.0~rc1.orig/scripts/xdg-desktop-menu   2011-03-30 13:08:54.000000000 +0200
 
20
+++ xdg-utils-1.1.0~rc1/scripts/xdg-desktop-menu        2011-03-30 13:09:26.217621591 +0200
 
21
@@ -686,7 +686,7 @@
 
22
             # App already listed as default
 
23
             continue;
 
24
         fi
 
25
-        default_file="$1/defaults.list"
 
26
+        default_file="$(readlink -f "$1/defaults.list")"
 
27
         DEBUG 1 "Updating $default_file"
 
28
         grep -v "$MIME=" $default_file > ${default_file}.new 2> /dev/null
 
29
         if ! grep "[Default Applications]" ${default_file}.new > /dev/null; then