kszbcss / xspec

Private backup of the xspec project at google code, as google code is going to disappear.
MIT License
1 stars 0 forks source link

Windows batch file cannot handle directory names containing spaces. #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

Attachments: