[soundconverter] Merge fix for accessing files in filesystem root dir (#1087901).

Michael Schwendt mschwendt at fedoraproject.org
Mon Dec 10 16:37:03 UTC 2012


commit 68fc86fde304e26009475e7d43bf965b3fd78a1c
Author: Michael Schwendt <mschwendt at fedoraproject.org>
Date:   Mon Dec 10 17:36:57 2012 +0100

    Merge fix for accessing files in filesystem root dir (#1087901).

 soundconverter-2.0.4-rootfiles.patch |   19 +++++++++++++++++++
 soundconverter.spec                  |    8 +++++++-
 2 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/soundconverter-2.0.4-rootfiles.patch b/soundconverter-2.0.4-rootfiles.patch
new file mode 100644
index 0000000..fc1e6b5
--- /dev/null
+++ b/soundconverter-2.0.4-rootfiles.patch
@@ -0,0 +1,19 @@
+diff -Nur soundconverter-2.0.4-orig/soundconverter/ui.py soundconverter-2.0.4/soundconverter/ui.py
+--- soundconverter-2.0.4-orig/soundconverter/ui.py	2012-10-06 12:43:23.000000000 +0200
++++ soundconverter-2.0.4/soundconverter/ui.py	2012-12-10 17:35:34.216706904 +0100
+@@ -248,8 +248,13 @@
+                 files.append(uri)
+ 
+         if not base:
+-            base, notused = os.path.split(os.path.commonprefix(files))
+-        base += '/'
++            base = os.path.commonprefix(files)
++            if base and not base.endswith('/'):
++                # we want a common folder
++                base = base[0:base.rfind('/')]
++                base += '/'
++        else:
++            base += '/'
+ 
+         for f in files:
+             sound_file = SoundFile(f, base)
diff --git a/soundconverter.spec b/soundconverter.spec
index 6da6119..a8db279 100644
--- a/soundconverter.spec
+++ b/soundconverter.spec
@@ -2,7 +2,7 @@
 
 Name:           soundconverter
 Version:        2.0.4
-Release:        7%{?dist}
+Release:        8%{?dist}
 Summary:        Simple sound converter application for GNOME
 
 Group:          Applications/Multimedia
@@ -15,6 +15,8 @@ BuildArch:      noarch
 Patch0: soundconverter-2.0.4-no-space-left.patch
 # work around lp #1063724 / gnome bz #683708
 Patch1: soundconverter-2.0.4-folder-choose.patch
+# lp #1087901
+Patch2: soundconverter-2.0.4-rootfiles.patch
 
 BuildRequires:  desktop-file-utils
 BuildRequires:  intltool gettext
@@ -55,6 +57,7 @@ writes anything the GStreamer library can.
 %setup -q -n %{name}-%{tar_ver}
 %patch0 -p1 -b .no-space-left
 %patch1 -p1 -b .folder-choose
+%patch2 -p1 -b .rootfiles
 
 
 %build
@@ -105,6 +108,9 @@ update-desktop-database &> /dev/null ||:
 
 
 %changelog
+* Mon Dec 10 2012 Michael Schwendt <mschwendt at fedoraproject.org> - 2.0.4-8
+- Merge fix for accessing files in filesystem root dir (#1087901).
+
 * Sat Dec  1 2012 Michael Schwendt <mschwendt at fedoraproject.org> - 2.0.4-7
 - Patch further to also fix the last used folder for the "Add Folder" button.
 - Patch for gnome bz #683708 and lp #1063724 GtkFileChooser problem.


More information about the scm-commits mailing list