Make path separator OS-dependent (PR #954)

This commit is contained in:
Andrea
2021-05-19 21:10:22 +01:00
committed by GitHub
parent 1b9a769332
commit de7f35e6bd
10 changed files with 30 additions and 24 deletions
+2 -2
View File
@@ -3690,7 +3690,7 @@ Update_t CmdConfigSetDebugDir (int nArgs)
{
sPath = g_aArgs[1].sArg;
}
else if (g_aArgs[1].sArg[0] == '\\') // Absolute
else if (g_aArgs[1].sArg[0] == PATH_SEPARATOR) // Absolute
{
if (g_sCurrentDir[1] == ':')
{
@@ -5982,7 +5982,7 @@ Update_t CmdOutputRun (int nArgs)
sMiniFileName = pFileName.substr(0, MIN(pFileName.size(), CONSOLE_WIDTH));
// strcat( sMiniFileName, ".aws" ); // HACK: MAGIC STRING
if (pFileName[0] == '\\' || pFileName[1] == ':') // NB. Any prefix quote has already been stripped
if (pFileName[0] == PATH_SEPARATOR || pFileName[1] == ':') // NB. Any prefix quote has already been stripped
{
// Abs pathname
sFileName = sMiniFileName;