~saiarcot895/ubuntu/wily/xdg-utils/fix-multiple-execs

« back to all changes in this revision

Viewing changes to debian/patches/xdg-mime-follow-symlinks.diff

  • Committer: Package Import Robot
  • Author(s): Per Olofsson
  • Date: 2011-12-12 12:04:25 UTC
  • mfrom: (1.2.8)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: package-import@ubuntu.com-20111212120425-0rdnrl8tn45vz171
Tags: 1.1.0~rc1+git20111210-1
* New upstream git snapshot b961235b197647d6649ef3d48d7cc2cecafe3d47.
* Drop patches applied upstream:
  - xdg-mime-follow-symlinks.diff
  - x-www-browser.diff
  - xdg-mime-generic-use-mimetype.diff
  - bashisms.diff
  - xdg-screensaver-check-gnome.diff
* Modify patches to make changes to scripts/xdg-*.in, instead of the
  generated scripts.
* Also check for ~/.mutt/muttrc when deciding whether to use mutt as
  MUA or not. Thanks to martin f krafft. Closes: #648733.
* Build scripts/xdg-* from *.in files.
* Build-depend on xmlto and awk, as they are needed when building the
  scripts.
* Also build the manual pages.
* Bump Standards-Version to 3.9.2. No changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Description: Follow symlinks when querying MIME type in xdg-mime.
2
 
 Otherwise we get stuff like inode/symlink back.
3
 
Author: Per Olofsson <pelle@debian.org>
4
 
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33097
5
 
 
6
 
--- a/scripts/xdg-mime
7
 
+++ b/scripts/xdg-mime
8
 
@@ -495,14 +495,12 @@ info_kde()
9
 
 
10
 
 info_gnome()
11
 
 {
12
 
-    file=`readlink -f "$1"` # Normalize path
13
 
-
14
 
     if gvfs-info --help 2>/dev/null 1>&2; then
15
 
-        DEBUG 1 "Running gvfs-info \"$file\""
16
 
-        gvfs-info "$file" 2> /dev/null | grep standard::content-type | cut -d' ' -f4
17
 
+        DEBUG 1 "Running gvfs-info \"$1\""
18
 
+        gvfs-info "$1" 2> /dev/null | grep standard::content-type | cut -d' ' -f4
19
 
     else
20
 
-       DEBUG 1 "Running gnomevfs-info \"$file\""
21
 
-       gnomevfs-info --slow-mime "$file" 2> /dev/null | grep "^MIME" | cut -d ":" -f 2 | sed s/"^ "//
22
 
+       DEBUG 1 "Running gnomevfs-info \"$1\""
23
 
+       gnomevfs-info --slow-mime "$1" 2> /dev/null | grep "^MIME" | cut -d ":" -f 2 | sed s/"^ "//
24
 
     fi
25
 
 
26
 
     if [ $? -eq 0 ]; then
27
 
@@ -751,6 +749,7 @@ case $1 in
28
 
             ;;
29
 
         esac
30
 
         check_input_file "$filename"
31
 
+        filename=$(readlink -f -- "$filename")
32
 
         ;;
33
 
 
34
 
       default)