From c9ad0b97cf24e57d419a9c227e696993b77d7f74 Mon Sep 17 00:00:00 2001 From: John Kelly Date: Wed, 10 May 2023 20:35:43 +0100 Subject: [PATCH] Add better error message for file save failure due to parent not existing (#7014) Fixes #5229 --- helix-view/src/document.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index 11b9ef0e620ed..27f69d508c6e7 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -808,7 +808,7 @@ impl Document { 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)"); } } }