[Pkg-owncloud-commits] [owncloud-client] 101/219: wizard: fix start a clean sync

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Oct 11 14:43:15 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 5870a570024ee5f44d66c1a3074593ee531ec08a
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Mon Sep 15 13:49:13 2014 +0200

    wizard: fix start a clean sync
    
    The problem was that the backup function failed as we tried to
    move  /home/xxx/ownCloud/  to /home/xxx/ownCloud/.oC_bak
    The intention was to move it to /home/xxx/ownCloud.oC_bak
    
    Issue #1989
---
 src/mirall/folderman.cpp | 5 ++++-
 src/mirall/folderman.h   | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/mirall/folderman.cpp b/src/mirall/folderman.cpp
index 61d768c..e07b571 100644
--- a/src/mirall/folderman.cpp
+++ b/src/mirall/folderman.cpp
@@ -613,8 +613,11 @@ void FolderMan::removeFolder( const QString& alias )
     }
 }
 
-QString FolderMan::getBackupName( const QString& fullPathName ) const
+QString FolderMan::getBackupName( QString fullPathName ) const
 {
+    if (fullPathName.endsWith("/"))
+        fullPathName.chop(1);
+
     if( fullPathName.isEmpty() ) return QString::null;
 
      QString newName = fullPathName + QLatin1String(".oC_bak");
diff --git a/src/mirall/folderman.h b/src/mirall/folderman.h
index 27723e0..571f0f8 100644
--- a/src/mirall/folderman.h
+++ b/src/mirall/folderman.h
@@ -139,7 +139,7 @@ private slots:
 private:
     // finds all folder configuration files
     // and create the folders
-    QString getBackupName( const QString& ) const;
+    QString getBackupName( QString fullPathName ) const;
     void registerFolderMonitor( Folder *folder );
 
     QString unescapeAlias( const QString& ) const;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list