diff --git a/csync/tests/ownCloud/t_recall.pl b/csync/tests/ownCloud/t_recall.pl index 008cad8fd3..244618cf85 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 306788388b..27a214d75f 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); } }