You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by lo...@apache.org on 2012/05/25 21:11:21 UTC

[2/3] qt commit: fixes for moveTo empty folder

fixes for moveTo empty folder


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/commit/1a17e943
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/tree/1a17e943
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/diff/1a17e943

Branch: refs/heads/master
Commit: 1a17e94303859a08d41526185000f6679a000bc1
Parents: 03d83eb
Author: Longwei Su <ls...@ics.com>
Authored: Fri May 25 13:26:33 2012 -0400
Committer: Longwei Su <ls...@ics.com>
Committed: Fri May 25 13:26:33 2012 -0400

----------------------------------------------------------------------
 src/plugins/fileapi.cpp |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/1a17e943/src/plugins/fileapi.cpp
----------------------------------------------------------------------
diff --git a/src/plugins/fileapi.cpp b/src/plugins/fileapi.cpp
index e37abac..c2581e3 100644
--- a/src/plugins/fileapi.cpp
+++ b/src/plugins/fileapi.cpp
@@ -653,6 +653,9 @@ void FileAPI::moveDir(int scId, int ecId,const QString& sourceDir, const QString
     if(destDir.exists() && (destFolder != sourceDir)){
         if(QDir(destinationParentDir).rmdir(dirName)){
             qDebug() << "empty folder rmed";
+        } else {
+            this->callback( ecId, "FileException.cast( FileException.INVALID_MODIFICATION_ERR )" );
+            return;
         }
     }
     if(copyFolder(sourceDir, destFolder)){