[gnote] Fix manifest move



commit 3c4b41933fb0ea4d85f68f3175a47750a9e8e145
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]