set error flag for invalid directories passed to myDelete (fixes bug #1227553)

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4150 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2005-06-30 20:47:27 +00:00
parent 27a8770159
commit dbb7153d65

View file

@ -180,7 +180,14 @@ void NSISCALL myDelete(char *buf, int flags)
}
#ifdef NSIS_SUPPORT_RMDIR
if (valid_dir && (flags & DEL_DIR) && file_exists(buf))
if ((flags & DEL_DIR))
{
if (!valid_dir)
{
log_printf2("RMDir: RemoveDirectory invalid input(\"%s\")",buf);
g_exec_flags.exec_error++;
}
else if (file_exists(buf))
{
addtrailingslash(buf);
log_printf2("RMDir: RemoveDirectory(\"%s\")",buf);
@ -201,8 +208,11 @@ void NSISCALL myDelete(char *buf, int flags)
}
}
else
{
update_status_text(LANG_REMOVEDIR,buf);
}
}
}
#endif//NSIS_SUPPORT_RMDIR
}