dont delete source files on moving if error occurs
[case] / src / fileoperator.h
index 1604b9e..221eaf8 100644 (file)
@@ -26,6 +26,7 @@
 #include <QWaitCondition>
 #include <QDir>
 #include <QMap>
+#include <QSet>
 
 
 class FileManipulatorThread;
@@ -108,6 +109,10 @@ protected:
     bool abort;
     bool ignoreAll[256];
 
+    // set of files that won't be deleted by the remove(...) functions
+    // used when move(...) would not overwrite target file to ensure the source file doesn't get deleted
+    QSet<QString> removeExcludeFiles;
+
     QMap<QString, qint64> fileSizeMap;
 
     QMutex mutex;