`WarcReader::from_path` creates the file, is that intended?
Probably wasn't intended. It seems the combination of options:
let file = fs::OpenOptions::new()
.read(true)
.create(true)
.truncate(false)
.open(&path)?;
is invalid and throws an error for me.
This might be an unrelated issue but when I run the read_file example, I get an InvalidInput error.
Error: Os { code: 22, kind: InvalidInput, message: "Invalid argument" }
@desmondcheongzx are you getting the same error?
Previously this was
let file = fs::OpenOptions::new()
.read(true)
.write(true)
.create(true)
.open(&path)?;
And then this commit removed write(true) and inserted truncate(false).
I tested it and just re-adding write(true) will get it to work, but maybe this breaks some clippy lint. @ahartel what do you think?
Why not just remove .write and .truncate since this is inside the reader?
Why not just remove
.writeand.truncatesince this is inside the reader?
Good point, I've created a pull request to cut the options down to just read(true) and open(&path).