fix: Fix opening file in read-only mode
This commit is contained in:
parent
e2a8d4f951
commit
6321b5f1b4
1 changed files with 5 additions and 1 deletions
|
@ -18,7 +18,11 @@ fn fix_file<P>(path: P) -> Result<()>
|
|||
where
|
||||
P: AsRef<Path>,
|
||||
{
|
||||
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")?;
|
||||
|
|
Loading…
Add table
Reference in a new issue