New discovery algorithm: Set the originalFile for ignored files
authorOlivier Goffart <ogoffart@woboq.com>
Tue, 9 Oct 2018 13:54:03 +0000 (15:54 +0200)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:58:08 +0000 (10:58 +0100)
This is used to show the name in the UI

src/libsync/discovery.cpp

index 0f1e298088c4ff65aaa59e4b567709588de4ea11..b6f8531565c296039daa1482be8ae2bec6ce741a 100644 (file)
@@ -296,6 +296,7 @@ bool ProcessDirectoryJob::handleExcluded(const QString &path, bool isDirectory,
 
     auto item = SyncFileItemPtr::create();
     item->_file = path;
+    item->_originalFile = path;
     item->_instruction = CSYNC_INSTRUCTION_IGNORE;
 
     if (isSymlink) {
@@ -1062,6 +1063,7 @@ void ProcessDirectoryJob::processBlacklisted(const PathTuple &path, const OCC::L
 
     auto item = SyncFileItem::fromSyncJournalFileRecord(dbEntry);
     item->_file = path._target;
+    item->_originalFile = path._original;
     item->_inode = localEntry.inode;
     if (dbEntry.isValid() && ((dbEntry._modtime == localEntry.modtime && dbEntry._fileSize == localEntry.size) || (localEntry.isDirectory && dbEntry._type == ItemTypeDirectory))) {
         item->_instruction = CSYNC_INSTRUCTION_REMOVE;