Fixed SMB recursive copy
authorTsu Jan <tsujan2000@gmail.com>
Mon, 8 Apr 2019 02:43:09 +0000 (07:13 +0430)
committerAlf Gaida <agaida@siduction.org>
Sat, 8 Jun 2019 14:39:11 +0000 (15:39 +0100)
Fixes https://github.com/lxqt/libfm-qt/issues/385 by trying to set dir permissions only once and ignoring possible errors (that happen with SMB and, maybe, other protocols).

Gbp-Pq: Name fix-smb-recursive-copy.patch

src/core/filetransferjob.cpp

index 4039c587ccfd32421ffe56b01560618b8d6c1640..6b4457663da5f923db447aca887b29c6187a3b4a 100644 (file)
@@ -279,16 +279,17 @@ bool FileTransferJob::makeDir(const FilePath& srcPath, GFileInfoPtr srcInfo, Fil
                                                          mode, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
                                                          cancellable().get(), &err);
                 if(!chmod_done) {
-                    ErrorAction act = emitError(err, ErrorSeverity::MODERATE);
+                    /* NOTE: Some filesystems may not support this. So, ignore errors for now. */
+                    break;
+                    /*ErrorAction act = emitError(err, ErrorSeverity::MODERATE);
                     if(act != ErrorAction::RETRY) {
                         break;
-                    }
-                    /* FIXME: some filesystems may not support this. */
+                    }*/
                 }
             } while(!chmod_done && !isCancelled());
         }
     }
-    return mkdir_done && chmod_done;
+    return mkdir_done/* && chmod_done*/;
 }
 
 bool FileTransferJob::handleError(GErrorPtr &err, const FilePath &srcPath, const GFileInfoPtr &srcInfo, FilePath &destPath, int& flags) {