We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81f60e4 commit 273f95cCopy full SHA for 273f95c
collector/src/utils/fs.rs
@@ -45,7 +45,7 @@ pub fn rename<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> anyhow::Result<
45
46
/// Touch a file, resetting its modification time.
47
pub fn touch(path: &Path) -> anyhow::Result<()> {
48
- let file = File::options().read(true).open(path)?;
+ let file = File::options().read(true).write(true).open(path)?;
49
file.set_modified(SystemTime::now())
50
.with_context(|| format!("touching file {:?}", path))?;
51
0 commit comments