Indeed, some ReactOS (and Windows as well) components do not support the system directory having spaces, in particular SMSS: this is due to the basic command-line parsing rules of SMSS that considers that the presence of a space in the command-line is equivalent to a separator, be it in or out a quoted string.
svn path=/trunk/; revision=66995
ERROR_UPDATE_LOCALESETTINGS,
ERROR_ADDING_KBLAYOUTS,
ERROR_UPDATE_GEOID,
+ ERROR_DIRECTORY_NAME,
ERROR_INSUFFICIENT_PARTITION_SIZE,
ERROR_PARTITION_TABLE_FULL,
ERROR_ONLY_ONE_EXTENDED,
ERROR_LAST_ERROR_CODE
-}ERROR_NUMBER;
+} ERROR_NUMBER;
/* EOF */
}
+BOOLEAN
+IsValidPath(
+ PWCHAR InstallDir,
+ ULONG Length)
+{
+ UINT i;
+
+ // TODO: Add check for 8.3 too.
+
+ /* Check for whitespaces */
+ for (i = 0; i < Length; i++)
+ {
+ if (isspace(InstallDir[i]))
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
NTSTATUS
SetupCreateDirectory(
PWCHAR PathName)
PWSTR PathName,
PWSTR FileName);
+BOOLEAN
+IsValidPath(
+ PWCHAR InstallDir,
+ ULONG Length);
+
/* EOF */
CONSOLE_SetInputTextXY(8, 11, 51, InstallDir);
MUIDisplayPage(INSTALL_DIRECTORY_PAGE);
+ // FIXME: Check the validity of the InstallDir; however what to do
+ // if it is invalid but we are in unattended setup? (case of somebody
+ // specified an invalid installation directory in the unattended file).
+
if (IsUnattendedSetup)
{
return InstallDirectoryPage1(InstallDir,
}
else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
{
+ /*
+ * Check for the validity of the installation directory and pop up
+ * an error if it is not the case. Then the user can fix its input.
+ */
+ if (!IsValidPath(InstallDir, Length))
+ {
+ MUIDisplayError(ERROR_DIRECTORY_NAME, Ir, POPUP_WAIT_ENTER);
+ return INSTALL_DIRECTORY_PAGE;
+ }
return InstallDirectoryPage1(InstallDir,
DiskEntry,
PartEntry);
"\8d áâனª â ¥ ¬®¦ ¤ ãáâ ®¢¨ ®§ ç¨â¥«ï £¥®£à ä᪮⮠¯®«®¦¥¨¥.\n"
"ENTER = \8f१ ¯ã᪠¥ ª®¬¯îâêà "
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Invalid directory name.\n"
+ "\n"
+ " * Press any key to continue."
+ },
{
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"Setup could not set the geo id.\n"
"ENTER = Reboot computer"
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Invalid directory name.\n"
+ "\n"
+ " * Press any key to continue."
+ },
{
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"Nepodaýilo se nastavit geo id.\n"
"ENTER = Restartovat po\9f¡ta\9f"
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Invalid directory name.\n"
+ "\n"
+ " * Press any key to continue."
+ },
{
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"eingetragen werden.\n"
"EINGABETASTE = Computer neu starten"
},
- {
+ {
//ERROR_UPDATE_GEOID,
"Der geografische Standort konnte nicht eingestellt werden.\n"
"EINGABETASTE = Computer neu starten"
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Unzul\84ssiger Verzeichnisname.\n"
+ "\n"
+ " * Eine beliebige Taste zum Fortsetzen dr\81cken."
+ },
{
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"Die gew\84hlten Partition ist nicht groá genug, um ReactOS zu installieren.\n"
"Setup could not set the geo id.\n"
"ENTER = Reboot computer"
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Invalid directory name.\n"
+ "\n"
+ " * Press any key to continue."
+ },
{
//ERROR_PARTITION_TABLE_FULL,
"You can not create a new primary or extended partition in the\n"
"Setup could not set the geo id.\n"
"ENTER = Reboot computer"
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Invalid directory name.\n"
+ "\n"
+ " * Press any key to continue."
+ },
{
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"El instalador no ha podido configurar el ID geogr fico.\n"
"INTRO = Reiniciar el equipo"
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Invalid directory name.\n"
+ "\n"
+ " * Press any key to continue."
+ },
{
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"Geograafilist asukohta ei ännestunud seadistada.\n"
"ENTER = Taask\84ivita arvuti"
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Invalid directory name.\n"
+ "\n"
+ " * Press any key to continue."
+ },
{
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"Setup n'a pas pu d\82finir la geo id.\n"
"ENTR\90E = Red\82marrer l'ordinateur"
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Nom de r\82pertoire invalide.\n"
+ "\n"
+ " * Appuyer sur une touche pour continuer."
+ },
{
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"Setup could not set the geo id.\n"
"ENTER = Reboot computer"
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Invalid directory name.\n"
+ "\n"
+ " * Press any key to continue."
+ },
{
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"Setup non ha potuto impostare l'id geografico.\n"
"INVIO = Riavviare il computer"
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Invalid directory name.\n"
+ "\n"
+ " * Press any key to continue."
+ },
{
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"¾¯Ä±¯ÌßÊ geo id ¦ ¾¯Ã² ÃÞ·Ï¾Ý ÃÞ¼À¡\n"
"ENTER = ºÝËß°ÀÉ »²·ÄÞ³"
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Invalid directory name.\n"
+ "\n"
+ " * Press any key to continue."
+ },
{
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"Setup could not set the geo id.\n"
"ENTER = Reboot computer"
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Invalid directory name.\n"
+ "\n"
+ " * Press any key to continue."
+ },
{
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"Setup kan de geografische positie niet instellen.\n"
"ENTER = Computer opnieuw opstarten"
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Invalid directory name.\n"
+ "\n"
+ " * Press any key to continue."
+ },
{
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"Instalator nie m¢g\88 ustawi\86 lokalizacji geograficznej.\n"
"ENTER = Restart komputera"
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Invalid directory name.\n"
+ "\n"
+ " * Press any key to continue."
+ },
{
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"NÆo foi poss¡vel configurar a identifica\87Æo geogr fica.\n"
"ENTER=Reiniciar"
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Invalid directory name.\n"
+ "\n"
+ " * Press any key to continue."
+ },
{
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"Nu s-a reuit setarea geo id.",
"ENTER = Repornire calculator"
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Invalid directory name.\n"
+ "\n"
+ " * Press any key to continue."
+ },
{
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"Partiîia selectatÇ este prea micÇ pentru a instala ReactOS.\n"
"Setup could not set the geo id.\n"
"ENTER = \8f¥à¥§ £à㧪 "
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Invalid directory name.\n"
+ "\n"
+ " * Press any key to continue."
+ },
{
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"Inçtal tor nemohol nastavi\9c geo id.\n"
"ENTER = Reçtart po\9f¡ta\9fa"
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Invalid directory name.\n"
+ "\n"
+ " * Press any key to continue."
+ },
{
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"Instalimi nuk mund t\89 vendosni id geo.\n"
"ENTER = Ristarto kompjuterin"
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Invalid directory name.\n"
+ "\n"
+ " * Press any key to continue."
+ },
{
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"Setup kunde inte stalla int 'geo id'.\n"
"ENTER = Starta om datorn"
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Invalid directory name.\n"
+ "\n"
+ " * Press any key to continue."
+ },
{
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"Kur, co§r\83f\8c kimli§i ayarlayamad\8d.\n"
"Giri\9f = Bilgisayar\8d Yeniden Ba\9flat"
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Invalid directory name.\n"
+ "\n"
+ " * Press any key to continue."
+ },
{
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"
"\8d¥ ¢¤ «®áì ¢áâ ®¢¨â¨ geo id.\n"
"ENTER = \8f¥à¥§ ¢ â ¦¨â¨ ª®¬¯'îâ¥à"
},
+ {
+ //ERROR_DIRECTORY_NAME,
+ "Invalid directory name.\n"
+ "\n"
+ " * Press any key to continue."
+ },
{
//ERROR_INSUFFICIENT_PARTITION_SIZE,
"The selected partition is not large enough to install ReactOS.\n"