gimsieke/xspec

Windows batch file cannot handle directory names containing spaces.

Closed this issue · 1 comments

Hello Jeni,

When attempting to run a xspec.bat in a directory with spaces in the name,
the batch file fails when trying to create the test subdirectory. The
simplest solution I found was to enclose %TEST_DIR% inside quotation marks.
 In other words, the code:

REM ================================================
REM Create xspec subdirectory for running the tests
REM ================================================
IF NOT EXIST %TEST_DIR% GOTO notestdir
GOTO endif2
:notestdir
echo Creating XSpec Directory at "%TEST_DIR%" ...
mkdir %TEST_DIR%
echo.
:endif2

should be replaced with:

REM ================================================
REM Create xspec subdirectory for running the tests
REM ================================================
IF NOT EXIST "%TEST_DIR%" GOTO notestdir
GOTO endif2
:notestdir
echo Creating XSpec Directory at "%TEST_DIR%" ...
mkdir "%TEST_DIR%"
echo.
:endif2

Everywhere else, TEST_DIR is enclosed in quotation marks anyway, so it
works fine.

Thanks,

-James

Original issue reported on code.google.com by jsulak@gmail.com on 8 Oct 2008 at 3:32

Thanks James!

I've fixed the batch file as suggested; see revision 21 
(http://code.google.com/p/xspec/source/detail?r=21) and 
the attached batch file.

Jeni

Original comment by jeni.ten...@gmail.com on 8 Oct 2008 at 6:27

  • Changed state: Fixed
  • Added labels: Component-Scripts, OpSys-Windows

Attachments: