[Pkg-owncloud-commits] [owncloud-client] 58/84: Recall: Copy instead of move recalled file #5150
Sandro Knauß
hefee at moszumanska.debian.org
Fri Oct 21 22:51:54 UTC 2016
This is an automated email from the git hooks/post-receive script.
hefee pushed a commit to branch master
in repository owncloud-client.
commit 4abaee7736bb2ecdbe2d5c357120910130dcf4a3
Author: Christian Kamm <mail at ckamm.de>
Date: Tue Sep 6 10:42:59 2016 +0200
Recall: Copy instead of move recalled file #5150
That was an unintentional change in
2662203fb7277d5d1a57cef556279f8cd3b974f5
Also expand the test case to cover this.
(cherry picked from commit af9c4d0e2fe1a42e1faf14779ca5ef1088bd1314)
---
csync/tests/ownCloud/t_recall.pl | 4 ++++
src/libsync/propagatedownload.cpp | 5 +++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/csync/tests/ownCloud/t_recall.pl b/csync/tests/ownCloud/t_recall.pl
index 008cad8..244618c 100755
--- a/csync/tests/ownCloud/t_recall.pl
+++ b/csync/tests/ownCloud/t_recall.pl
@@ -64,6 +64,10 @@ csync();
assert( -e glob(localDir().'dir/file2_.sys.admin#recall#-*.dat' ) );
assert( -e glob(localDir().'dir/file3_.sys.admin#recall#-*.dat' ) );
+# verify that the original files still exist
+assert( -e glob(localDir().'dir/file2.dat' ) );
+assert( -e glob(localDir().'dir/file3.dat' ) );
+
#Remove the recall file
unlink(localDir() . ".sys.admin#recall#");
diff --git a/src/libsync/propagatedownload.cpp b/src/libsync/propagatedownload.cpp
index 3067883..27a214d 100644
--- a/src/libsync/propagatedownload.cpp
+++ b/src/libsync/propagatedownload.cpp
@@ -638,8 +638,9 @@ static void handleRecallFile(const QString &fn)
QString rpath = makeRecallFileName(fpath);
qDebug() << "Copy recall file: " << fpath << " -> " << rpath;
- QString error;
- FileSystem::uncheckedRenameReplace(fpath, rpath, &error);
+ // Remove the target first, QFile::copy will not overwrite it.
+ FileSystem::remove(rpath);
+ QFile::copy(fpath, rpath);
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list