sync() after write to avoid losing file data on power off.

This commit is contained in:
Robin Davies
2024-09-01 09:53:32 -04:00
parent abb8a1a53c
commit b8c4fafd3a
21 changed files with 102 additions and 34 deletions
+2
View File
@@ -28,6 +28,7 @@
#include <memory>
#include "ZipFile.hpp"
#include "PiPedalUI.hpp"
#include "ofstream_synced.hpp"
#define PRESET_EXTENSION ".piPreset"
@@ -439,6 +440,7 @@ public:
Lv2Log::error(SS("Unzip failed. " << e.what()));
throw;
}
FileSystemSync();
} else {
outputFileName = this->model->UploadUserFile(directory,patchProperty,filename,req.get_body_input_stream(), req.content_length());