diff options
Diffstat (limited to 'src/spellfile.c')
-rw-r--r-- | src/spellfile.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/spellfile.c b/src/spellfile.c index 51261ab..0b9536d 100644 --- a/src/spellfile.c +++ b/src/spellfile.c @@ -6434,7 +6434,13 @@ init_spellfile(void) l = (int)STRLEN(buf); vim_snprintf((char *)buf + l, MAXPATHL - l, "/spell"); if (filewritable(buf) != 2) - vim_mkdir(buf, 0755); + { + if (vim_mkdir(buf, 0755) != 0) + { + vim_free(buf); + return; + } + } l = (int)STRLEN(buf); vim_snprintf((char *)buf + l, MAXPATHL - l, |