[SETUPLIB][USETUP] Code refactoring: rename the old DoesPathExist() into DoesDirExist...
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Mon, 21 Aug 2017 19:41:40 +0000 (19:41 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 27 Oct 2018 16:13:40 +0000 (18:13 +0200)
svn path=/branches/setup_improvements/; revision=75636

base/setup/lib/filesup.c
base/setup/lib/filesup.h
base/setup/lib/osdetect.c
base/setup/usetup/filesup.c
base/setup/usetup/usetup.c

index 44a8698..61cc1b4 100644 (file)
@@ -582,7 +582,7 @@ CombinePaths(
 }
 
 BOOLEAN
 }
 
 BOOLEAN
-DoesPathExistEx(
+DoesPathExist(
     IN HANDLE RootDirectory OPTIONAL,
     IN PCWSTR PathName,
     IN BOOLEAN IsDirectory)
     IN HANDLE RootDirectory OPTIONAL,
     IN PCWSTR PathName,
     IN BOOLEAN IsDirectory)
index a9fabf4..5aa2280 100644 (file)
@@ -61,16 +61,16 @@ CombinePaths(
     IN /* PCWSTR */ ...);
 
 BOOLEAN
     IN /* PCWSTR */ ...);
 
 BOOLEAN
-DoesPathExistEx(
+DoesPathExist(
     IN HANDLE RootDirectory OPTIONAL,
     IN PCWSTR PathName,
     IN BOOLEAN IsDirectory);
 
     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)  \
 
 #define DoesFileExist(RootDirectory, FileName)  \
-    DoesPathExistEx((RootDirectory), (FileName), FALSE)
+    DoesPathExist((RootDirectory), (FileName), FALSE)
 
 // FIXME: DEPRECATED! HACKish function that needs to be deprecated!
 BOOLEAN
 
 // FIXME: DEPRECATED! HACKish function that needs to be deprecated!
 BOOLEAN
index ce71007..928b6a7 100644 (file)
@@ -359,7 +359,7 @@ IsValidNTOSInstallationByHandle(
 
     /* Check for the existence of \SystemRoot\System32 */
     PathName = L"System32\\";
 
     /* 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;
     {
         // 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\\";
 
     /* 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;
     {
         // 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\\";
 
     /* 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;
     {
         // DPRINT1("Failed to open directory '%S', Status 0x%08lx\n", PathName, Status);
         return FALSE;
index 261bfd9..fa13a0d 100644 (file)
@@ -112,7 +112,7 @@ SetupCreateDirectory(
             *Ptr = 0;
 
             DPRINT("PathBuffer: %S\n", PathBuffer);
             *Ptr = 0;
 
             DPRINT("PathBuffer: %S\n", PathBuffer);
-            if (!DoesPathExist(NULL, PathBuffer))
+            if (!DoesDirExist(NULL, PathBuffer))
             {
                 DPRINT("Create: %S\n", PathBuffer);
                 Status = SetupCreateSingleDirectory(PathBuffer);
             {
                 DPRINT("Create: %S\n", PathBuffer);
                 Status = SetupCreateSingleDirectory(PathBuffer);
@@ -126,7 +126,7 @@ SetupCreateDirectory(
         Ptr++;
     }
 
         Ptr++;
     }
 
-    if (!DoesPathExist(NULL, PathBuffer))
+    if (!DoesDirExist(NULL, PathBuffer))
     {
         DPRINT("Create: %S\n", PathBuffer);
         Status = SetupCreateSingleDirectory(PathBuffer);
     {
         DPRINT("Create: %S\n", PathBuffer);
         Status = SetupCreateSingleDirectory(PathBuffer);
index af5708f..8ce3ec5 100644 (file)
@@ -4481,7 +4481,7 @@ BootLoaderFloppyPage(PINPUT_RECORD Ir)
         }
         else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D)    /* ENTER */
         {
         }
         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;
             {
                 MUIDisplayError(ERROR_NO_FLOPPY, Ir, POPUP_WAIT_ENTER);
                 return BOOT_LOADER_FLOPPY_PAGE;