[gnote] User write_all to write remote files



commit c2e5bef274c5d93ae1a4240d540143a6a96b6121
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sun Apr 11 22:29:46 2021 +0300

    User write_all to write remote files
    
    Fixes https://gitlab.gnome.org/GNOME/gnote/-/issues/50

 src/synchronization/filesystemsyncserver.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/synchronization/filesystemsyncserver.cpp b/src/synchronization/filesystemsyncserver.cpp
index 84713349..bebb6364 100644
--- a/src/synchronization/filesystemsyncserver.cpp
+++ b/src/synchronization/filesystemsyncserver.cpp
@@ -373,7 +373,8 @@ bool FileSystemSyncServer::commit_sync_transaction()
         manifest_file->remove();
       }
       auto stream = manifest_file->create_file();
-      stream->write(xml_content);
+      gsize written;
+      stream->write_all(xml_content, written);
       stream->close();
     }
     catch(...) {
@@ -633,7 +634,8 @@ void FileSystemSyncServer::update_lock_file(const SyncLockInfo & syncLockInfo)
 
     xml.close();
     auto stream = m_lock_path->replace();
-    stream->write(xml.to_string());
+    gsize written;
+    stream->write_all(xml.to_string(), written);
     stream->close();
   }
   catch(Glib::Error & e) {


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