File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -196,7 +196,9 @@ class FileManager {
196196 final File file = getFile (filePath);
197197 await _createFileDirectory (filePath);
198198 Future writeFuture = Future .wait ([
199- file.writeAsBytes (toWrite),
199+ file.writeAsBytes (toWrite).then ((file) async {
200+ if (lastModified != null ) await file.setLastModified (lastModified);
201+ }),
200202 // if we're using a new format, also delete the old file
201203 if (filePath.endsWith (Editor .extension ))
202204 getFile (
@@ -209,9 +211,6 @@ class FileManager {
209211 ]);
210212
211213 void afterWrite () {
212- if (lastModified != null ) {
213- file.setLastModified (lastModified);
214- }
215214 broadcastFileWrite (FileOperationType .write, filePath);
216215 if (alsoUpload) syncer.uploader.enqueueRel (filePath);
217216 if (filePath.endsWith (Editor .extension )) {
You can’t perform that action at this time.
0 commit comments