[gnote/gnome-3-36] Fix manifest move
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote/gnome-3-36] Fix manifest move
- Date: Sun, 10 May 2020 13:11:16 +0000 (UTC)
commit 5c017b60bf76f1c4571d3f181668840edda6f193
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sun Mar 22 17:19:09 2020 +0200
Fix manifest move
src/synchronization/filesystemsyncserver.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/synchronization/filesystemsyncserver.cpp b/src/synchronization/filesystemsyncserver.cpp
index 51d24dcb..5f64c010 100644
--- a/src/synchronization/filesystemsyncserver.cpp
+++ b/src/synchronization/filesystemsyncserver.cpp
@@ -327,8 +327,11 @@ bool FileSystemSyncServer::commit_sync_transaction()
// Rename original /manifest.xml to /manifest.xml.old
Glib::RefPtr<Gio::File> oldManifestPath = Gio::File::create_for_uri(m_manifest_path->get_uri() + ".old");
+ if(oldManifestPath->query_exists()) {
+ oldManifestPath->remove();
+ }
if(m_manifest_path->query_exists() == true) {
- m_manifest_path->move(oldManifestPath, Gio::FILE_COPY_OVERWRITE);
+ m_manifest_path->move(oldManifestPath);
}
// * * * Begin Cleanup Code * * *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]