diff --git a/src/main.rs b/src/main.rs
index 10580a1..87e7c88 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -18,7 +18,11 @@ fn fix_file
(path: P) -> Result<()>
where
P: AsRef,
{
- let mut f = File::open(&path).with_context(|| "failed to open sound bank file")?;
+ let mut f = File::options()
+ .write(true)
+ .read(true)
+ .open(&path)
+ .with_context(|| "failed to open sound bank file")?;
f.seek(SeekFrom::Start(OFFSET_VERSION_NUMBER))
.with_context(|| "failed to seek to version number offset")?;