Skip to content

Commit

Permalink
do not forget the path when renaming files with invalid names
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu Gallien <[email protected]>
  • Loading branch information
mgallien committed Dec 7, 2021
1 parent 6ceb45b commit b053cf9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/libsync/discovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,13 @@ void ProcessDirectoryJob::processFile(PathTuple path,
item->_originalFile = path._original;
item->_previousSize = dbEntry._fileSize;
item->_previousModtime = dbEntry._modtime;
item->_renameTarget = localEntry.renameName;
if (!localEntry.renameName.isEmpty()) {
if (_dirItem) {
item->_renameTarget = _dirItem->_file + "/" + localEntry.renameName;
} else {
item->_renameTarget = localEntry.renameName;
}
}

if (dbEntry._modtime == localEntry.modtime && dbEntry._type == ItemTypeVirtualFile && localEntry.type == ItemTypeFile) {
item->_type = ItemTypeFile;
Expand Down

0 comments on commit b053cf9

Please sign in to comment.