https://git.reactos.org/?p=reactos.git;a=commitdiff;h=29fe31df1ba35a14582f4…
commit 29fe31df1ba35a14582f4ef5df9dfbc586d2820e
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Mon Aug 21 19:41:40 2017 +0000
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sat Oct 27 18:13:40 2018 +0200
[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
---
base/setup/lib/filesup.c | 2 +-
base/setup/lib/filesup.h | 8 ++++----
base/setup/lib/osdetect.c | 6 +++---
base/setup/usetup/filesup.c | 4 ++--
base/setup/usetup/usetup.c | 2 +-
5 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/base/setup/lib/filesup.c b/base/setup/lib/filesup.c
index 44a869821a..61cc1b4c5e 100644
--- a/base/setup/lib/filesup.c
+++ b/base/setup/lib/filesup.c
@@ -582,7 +582,7 @@ CombinePaths(
}
BOOLEAN
-DoesPathExistEx(
+DoesPathExist(
IN HANDLE RootDirectory OPTIONAL,
IN PCWSTR PathName,
IN BOOLEAN IsDirectory)
diff --git a/base/setup/lib/filesup.h b/base/setup/lib/filesup.h
index a9fabf4b2c..5aa2280182 100644
--- a/base/setup/lib/filesup.h
+++ b/base/setup/lib/filesup.h
@@ -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
diff --git a/base/setup/lib/osdetect.c b/base/setup/lib/osdetect.c
index ce71007cb6..928b6a7ea0 100644
--- a/base/setup/lib/osdetect.c
+++ b/base/setup/lib/osdetect.c
@@ -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;
diff --git a/base/setup/usetup/filesup.c b/base/setup/usetup/filesup.c
index 261bfd9fa8..fa13a0dbe1 100644
--- a/base/setup/usetup/filesup.c
+++ b/base/setup/usetup/filesup.c
@@ -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);
diff --git a/base/setup/usetup/usetup.c b/base/setup/usetup/usetup.c
index af5708ffc5..8ce3ec5338 100644
--- a/base/setup/usetup/usetup.c
+++ b/base/setup/usetup/usetup.c
@@ -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;