[gnote/gnome-3-36] Fix exception in GVFS when replacing existing manifest



commit e230391934d06c42ee114a25d71ec897c49a8da7
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sun Mar 22 17:18:34 2020 +0200

    Fix exception in GVFS when replacing existing manifest

 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 c4ce3416..51d24dcb 100644
--- a/src/synchronization/filesystemsyncserver.cpp
+++ b/src/synchronization/filesystemsyncserver.cpp
@@ -309,7 +309,10 @@ bool FileSystemSyncServer::commit_sync_transaction()
       Glib::ustring xml_content = xml->to_string();
       delete xml;
       xml = nullptr;
-      auto stream = manifest_file->create_file(Gio::FILE_CREATE_REPLACE_DESTINATION);
+      if(manifest_file->query_exists()) {
+        manifest_file->remove();
+      }
+      auto stream = manifest_file->create_file();
       stream->write(xml_content);
       stream->close();
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]