1
0
Fork 0
mirror of https://github.com/helix-editor/helix synced 2024-05-05 10:56:03 +02:00

Add better error message for file save failure due to parent not existing (#7014)

Fixes #5229
This commit is contained in:
John Kelly 2023-05-10 20:35:43 +01:00 committed by GitHub
parent 92c328c088
commit 87da58578f
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -808,7 +808,7 @@ impl Future<Output = Result<DocumentSavedEvent, anyhow::Error>> + 'static + Send
if force {
std::fs::DirBuilder::new().recursive(true).create(parent)?;
} else {
bail!("can't save file, parent directory does not exist");
bail!("can't save file, parent directory does not exist (use :w! to create it)");
}
}
}