summaryrefslogtreecommitdiff
path: root/subplotlib
diff options
context:
space:
mode:
Diffstat (limited to 'subplotlib')
-rw-r--r--subplotlib/src/steplibrary/files.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/subplotlib/src/steplibrary/files.rs b/subplotlib/src/steplibrary/files.rs
index 9b00e17..b1596ae 100644
--- a/subplotlib/src/steplibrary/files.rs
+++ b/subplotlib/src/steplibrary/files.rs
@@ -99,6 +99,7 @@ pub fn touch_with_timestamp(context: &Datadir, filename: &Path, mtime: &str) {
drop(
OpenOptions::new()
.create(true)
+ .truncate(false)
.write(true)
.open(&full_path)?,
);
@@ -154,6 +155,7 @@ pub fn touch(context: &Datadir, filename: &Path) {
drop(
OpenOptions::new()
.create(true)
+ .truncate(false)
.write(true)
.open(&full_path)?,
);