is_valid_instpath: don't check the current directory, check the root directory
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3521 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
f68c7b6156
commit
22e2a6271e
1 changed files with 2 additions and 1 deletions
|
@ -211,13 +211,14 @@ int NSISCALL is_valid_instpath(char *s)
|
|||
WIN32_FIND_DATA *fd = file_exists(tmp);
|
||||
// if the directory bit not set then it's a file, which is not a valid inst dir...
|
||||
// GetFileAttributes is not used because it doesn't work with certain files (error 32)
|
||||
// as for concers of the user using * or ?, that's invalid anyway...
|
||||
// as for concerns of the user using * or ?, that's invalid anyway...
|
||||
if (fd && !(fd->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
|
||||
return 0;
|
||||
trimslashtoend(tmp);
|
||||
}
|
||||
|
||||
// if the root drive exists
|
||||
addtrailingslash(tmp); // don't check the current directory, check the root directory
|
||||
if (GetFileAttributes(tmp) == INVALID_FILE_ATTRIBUTES)
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue