w3champions / flo

Warcraft III toolkit in Rust.
MIT License
119 stars 21 forks source link

fix: ensure target dir for replay exists #36

Closed kfot closed 11 months ago

fluxxu commented 11 months 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