summaryrefslogtreecommitdiff
path: root/src/flac.rs
diff options
context:
space:
mode:
authorjakka <jakkadoujin@gmail.com>2025-06-10 19:55:53 +0300
committerjakka <jakkadoujin@gmail.com>2025-06-10 19:55:53 +0300
commita00b57823ee918989ffeae2b93ec778aefc93cb2 (patch)
tree19644e6f0085568239ac3523ce79d0c56e6dc749 /src/flac.rs
parent4ecfc50de96a07de00757a625546b9fc43e9c2c3 (diff)
continued working
Diffstat (limited to 'src/flac.rs')
-rw-r--r--src/flac.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/flac.rs b/src/flac.rs
index af95a7a..febdd3d 100644
--- a/src/flac.rs
+++ b/src/flac.rs
@@ -171,7 +171,9 @@ pub fn encode_file(file: &std::path::Path) -> Result<()> {
}
}
- output.write_to_path(tempname)?;
+ output.write_to_path(&tempname)?;
+
+ std::fs::rename(&tempname, file)?;
Ok(())
}