aboutsummaryrefslogtreecommitdiff
path: root/sam.c
diff options
context:
space:
mode:
Diffstat (limited to 'sam.c')
-rw-r--r--sam.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sam.c b/sam.c
index d32066d..ae4106a 100644
--- a/sam.c
+++ b/sam.c
@@ -1661,8 +1661,10 @@ static bool cmd_write(Vis *vis, Win *win, Command *cmd, const char *argv[], Sele
for (const char **name = argv[1] ? &argv[1] : (const char*[]){ filename, NULL }; *name; name++) {
char *path = absolute_path(*name);
- if (!path)
+ if (!path) {
+ vis_info_show(vis, "Can't open file for writing: %s", strerror(errno));
return false;
+ }
struct stat meta;
bool existing_file = !stat(path, &meta);