[SETUPLIB][USETUP] Code refactoring: rename the old DoesPathExist() into DoesDirExist(), and rename the new DoesPathExistEx() back into DoesPathExist().

svn path=/branches/setup_improvements/; revision=75636
This commit is contained in:
Hermès Bélusca-Maïto 2017-08-21 19:41:40 +00:00
parent cc37199dfd
commit 29fe31df1b
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
5 changed files with 11 additions and 11 deletions

View file

@ -582,7 +582,7 @@ CombinePaths(
}
BOOLEAN
DoesPathExistEx(
DoesPathExist(
IN HANDLE RootDirectory OPTIONAL,
IN PCWSTR PathName,
IN BOOLEAN IsDirectory)

View file

@ -61,16 +61,16 @@ CombinePaths(
IN /* PCWSTR */ ...);
BOOLEAN
DoesPathExistEx(
DoesPathExist(
IN HANDLE RootDirectory OPTIONAL,
IN PCWSTR PathName,
IN BOOLEAN IsDirectory);
#define DoesPathExist(RootDirectory, PathName) \
DoesPathExistEx((RootDirectory), (PathName), TRUE)
#define DoesDirExist(RootDirectory, DirName) \
DoesPathExist((RootDirectory), (DirName), TRUE)
#define DoesFileExist(RootDirectory, FileName) \
DoesPathExistEx((RootDirectory), (FileName), FALSE)
DoesPathExist((RootDirectory), (FileName), FALSE)
// FIXME: DEPRECATED! HACKish function that needs to be deprecated!
BOOLEAN

View file

@ -359,7 +359,7 @@ IsValidNTOSInstallationByHandle(
/* Check for the existence of \SystemRoot\System32 */
PathName = L"System32\\";
if (!DoesPathExist(SystemRootDirectory, PathName))
if (!DoesDirExist(SystemRootDirectory, PathName))
{
// DPRINT1("Failed to open directory '%S', Status 0x%08lx\n", PathName, Status);
return FALSE;
@ -367,7 +367,7 @@ IsValidNTOSInstallationByHandle(
/* Check for the existence of \SystemRoot\System32\drivers */
PathName = L"System32\\drivers\\";
if (!DoesPathExist(SystemRootDirectory, PathName))
if (!DoesDirExist(SystemRootDirectory, PathName))
{
// DPRINT1("Failed to open directory '%S', Status 0x%08lx\n", PathName, Status);
return FALSE;
@ -375,7 +375,7 @@ IsValidNTOSInstallationByHandle(
/* Check for the existence of \SystemRoot\System32\config */
PathName = L"System32\\config\\";
if (!DoesPathExist(SystemRootDirectory, PathName))
if (!DoesDirExist(SystemRootDirectory, PathName))
{
// DPRINT1("Failed to open directory '%S', Status 0x%08lx\n", PathName, Status);
return FALSE;

View file

@ -112,7 +112,7 @@ SetupCreateDirectory(
*Ptr = 0;
DPRINT("PathBuffer: %S\n", PathBuffer);
if (!DoesPathExist(NULL, PathBuffer))
if (!DoesDirExist(NULL, PathBuffer))
{
DPRINT("Create: %S\n", PathBuffer);
Status = SetupCreateSingleDirectory(PathBuffer);
@ -126,7 +126,7 @@ SetupCreateDirectory(
Ptr++;
}
if (!DoesPathExist(NULL, PathBuffer))
if (!DoesDirExist(NULL, PathBuffer))
{
DPRINT("Create: %S\n", PathBuffer);
Status = SetupCreateSingleDirectory(PathBuffer);

View file

@ -4481,7 +4481,7 @@ BootLoaderFloppyPage(PINPUT_RECORD Ir)
}
else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
{
if (DoesPathExist(NULL, L"\\Device\\Floppy0\\") == FALSE)
if (DoesDirExist(NULL, L"\\Device\\Floppy0\\") == FALSE)
{
MUIDisplayError(ERROR_NO_FLOPPY, Ir, POPUP_WAIT_ENTER);
return BOOT_LOADER_FLOPPY_PAGE;