ex_docmd: Make E739 message contain strerror() output

This commit is contained in:
ZyX 2015-07-12 14:06:20 +03:00
parent b56934e28d
commit afd3e69e9f

View File

@ -7547,8 +7547,9 @@ static void ex_mkrc(exarg_T *eap)
int vim_mkdir_emsg(char_u *name, int prot)
{
if (os_mkdir((char *)name, prot) != 0) {
EMSG2(_("E739: Cannot create directory: %s"), name);
int ret;
if ((ret = os_mkdir((char *)name, prot)) != 0) {
EMSG3(_("E739: Cannot create directory %s: %s"), name, os_strerror(ret));
return FAIL;
}
return OK;