Skip to content

Commit

Permalink
Update async write routine
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeiPatiakin committed Feb 5, 2025
1 parent 434695b commit 6bb590a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion core/src/services/fs/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,14 @@ impl Access for FsBackend {
};

let mut open_options = tokio::fs::OpenOptions::new();
open_options.create(true).write(true);
if op.if_not_exists() {
open_options.create_new(true);
} else {
open_options.create(true);
}

open_options.write(true);

if op.append() {
open_options.append(true);
} else {
Expand Down

0 comments on commit 6bb590a

Please sign in to comment.