From 22e2a6271e2f09de7f698a79b909f5d8abe1fd1c Mon Sep 17 00:00:00 2001 From: kichik Date: Fri, 9 Apr 2004 12:47:33 +0000 Subject: [PATCH] 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 --- Source/exehead/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/exehead/util.c b/Source/exehead/util.c index be81a79f..f99aacec 100644 --- a/Source/exehead/util.c +++ b/Source/exehead/util.c @@ -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;