Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>2021-12-03 13:43:45 +0300
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>2021-12-07 13:35:38 +0300
commitb053cf9e2a987a3d554a2b047a60c2f8dfb9a716 (patch)
tree20a7ed7571ede93ffff5a9bb50e4aa936cdf4806 /src/libsync
parent6ceb45bac4efc2ebd6ad3bc427efb9552105ce1c (diff)
do not forget the path when renaming files with invalid names
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Diffstat (limited to 'src/libsync')
-rw-r--r--src/libsync/discovery.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp
index 8d16c6f0a..f67967025 100644
--- a/src/libsync/discovery.cpp
+++ b/src/libsync/discovery.cpp
@@ -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;