don't try to delete a directory after reboot if it's not even valid
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3659 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
64c1b0f05e
commit
d7ca86c446
1 changed files with 3 additions and 2 deletions
|
@ -101,9 +101,10 @@ void NSISCALL myDelete(char *buf, int flags)
|
|||
HANDLE h;
|
||||
WIN32_FIND_DATA fd;
|
||||
char *fn;
|
||||
int valid_dir=is_valid_instpath(buf);
|
||||
|
||||
#ifdef NSIS_SUPPORT_RMDIR
|
||||
if (!(flags & DEL_DIR) || (is_valid_instpath(buf) && (flags & DEL_RECURSE)))
|
||||
if (!(flags & DEL_DIR) || (valid_dir && (flags & DEL_RECURSE)))
|
||||
#endif//NSIS_SUPPORT_RMDIR
|
||||
{
|
||||
mystrcpy(lbuf,buf);
|
||||
|
@ -173,7 +174,7 @@ void NSISCALL myDelete(char *buf, int flags)
|
|||
}
|
||||
|
||||
#ifdef NSIS_SUPPORT_RMDIR
|
||||
if (flags & DEL_DIR)
|
||||
if (valid_dir && (flags & DEL_DIR))
|
||||
{
|
||||
addtrailingslash(buf);
|
||||
log_printf2("RMDir: RemoveDirectory(\"%s\")",buf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue