[arch-commits] Commit in kdelibs/trunk (fix-save-path.patch)

Andrea Scarpino andrea at archlinux.org
Fri Nov 9 21:01:33 UTC 2012


    Date: Friday, November 9, 2012 @ 16:01:32
  Author: andrea
Revision: 170701

Fix a regression in 'Save As' (FS#32560)

Added:
  kdelibs/trunk/fix-save-path.patch

---------------------+
 fix-save-path.patch |   27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

Added: fix-save-path.patch
===================================================================
--- fix-save-path.patch	                        (rev 0)
+++ fix-save-path.patch	2012-11-09 21:01:32 UTC (rev 170701)
@@ -0,0 +1,27 @@
+commit 793e2a69f8aa193b60494b03d51c5fd44373c0e7
+Author: Jonathan Marten <jjm at keelhaul.me.uk>
+Date:   Wed Nov 7 12:45:03 2012 +0000
+
+    Fix regression: specified or remembered save path is not used
+    
+    As requested on review https://git.reviewboard.kde.org/r/106475/
+
+diff --git a/kfile/kfilewidget.cpp b/kfile/kfilewidget.cpp
+index 65deca2..e755aae 100644
+--- a/kfile/kfilewidget.cpp
++++ b/kfile/kfilewidget.cpp
+@@ -2593,8 +2593,12 @@ KUrl KFileWidget::getStartUrl( const KUrl& startDir,
+         }
+         else						// not special "kfiledialog" URL
+         {
+-            if (!startDir.isRelative())	// has directory, maybe with filename
+-            {
++            // We can use startDir as the starting directory if either:
++            // (a) it has a directory part, or
++            // (b) there is a scheme (protocol), and it is not just "file".
++            if (!startDir.directory().isEmpty() ||
++                (!startDir.scheme().isEmpty() && !startDir.isLocalFile()))
++            {						// can use start directory
+                 ret = startDir;				// will be checked by stat later
+                 // If we won't be able to list it (e.g. http), then use default
+                 if ( !KProtocolManager::supportsListing( ret ) ) {




More information about the arch-commits mailing list