1
0
mirror of https://github.com/danog/ytop.git synced 2024-11-26 20:15:03 +01:00

Create logfile dir if it doesn't exist

This commit is contained in:
Caleb Bassi 2019-07-20 18:00:28 -07:00
parent 10e5b24f9f
commit 161ff14196

View File

@ -57,6 +57,7 @@ fn setup_ui_events() -> Receiver<InputEvent> {
}
fn setup_logfile(logfile_path: &Path) {
fs::create_dir_all(logfile_path.parent().unwrap()).unwrap(); // TODO: unwrap
let logfile = fs::OpenOptions::new()
.write(true)
.create(true)