patch 8.1.2180: Error E303 is not useful when 'directory' is empty
Problem: Error E303 is not useful when 'directory' is empty.
Solution: Skip the error message. (Daniel Hahler, #5067)
diff --git a/src/memline.c b/src/memline.c
index c77d1df..a26e401 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -804,9 +804,9 @@
}
}
- if (mfp->mf_fname == NULL) /* Failed! */
+ if (*p_dir != NUL && mfp->mf_fname == NULL)
{
- need_wait_return = TRUE; /* call wait_return later */
+ need_wait_return = TRUE; // call wait_return later
++no_wait_return;
(void)semsg(_("E303: Unable to open swap file for \"%s\", recovery impossible"),
buf_spname(buf) != NULL ? buf_spname(buf) : buf->b_fname);