w3champions / flo

Warcraft III toolkit in Rust.
MIT License
121 stars 23 forks source link

fix: ensure target dir for replay exists #36

Closed kfot closed 12 months ago

fluxxu commented 1 year ago

Hi! Thank you for the PR!

I suggest moving the folder creation code to:

https://github.com/w3champions/flo/blob/develop/crates/client/src/lan/game/game.rs#L198

The open call should fail if the parent folder doesn't exist. This behavior aligns with that of std::fs::File::create. image