From 22962564641b443dc445ef61312496ff38c6b384 Mon Sep 17 00:00:00 2001 From: Dominic Della Valle Date: Sat, 10 Jul 2021 04:46:07 -0400 Subject: [PATCH] Fix: handle whitespace paths for Windows launchers --- Ghidra/RuntimeScripts/Windows/server/ghidraSvr.bat | 2 +- Ghidra/RuntimeScripts/Windows/support/launch.bat | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Ghidra/RuntimeScripts/Windows/server/ghidraSvr.bat b/Ghidra/RuntimeScripts/Windows/server/ghidraSvr.bat index bb2cf2596b..fc03892c5f 100644 --- a/Ghidra/RuntimeScripts/Windows/server/ghidraSvr.bat +++ b/Ghidra/RuntimeScripts/Windows/server/ghidraSvr.bat @@ -24,7 +24,7 @@ set "SERVER_DIR=%~dp0" set "SERVER_DIR=%SERVER_DIR:~0,-1%" rem Ensure Ghidra path doesn't contain illegal characters -if not %SERVER_DIR:!=%==%SERVER_DIR% ( +if not "%SERVER_DIR:!=%"=="%SERVER_DIR%" ( echo Ghidra path cannot contain a "!" character. exit /B 1 ) diff --git a/Ghidra/RuntimeScripts/Windows/support/launch.bat b/Ghidra/RuntimeScripts/Windows/support/launch.bat index b5ae0ca399..5f3069f770 100644 --- a/Ghidra/RuntimeScripts/Windows/support/launch.bat +++ b/Ghidra/RuntimeScripts/Windows/support/launch.bat @@ -39,7 +39,7 @@ set "SUPPORT_DIR=%~dp0" set "SUPPORT_DIR=%SUPPORT_DIR:~0,-1%" :: Ensure Ghidra path doesn't contain illegal characters -if not %SUPPORT_DIR:!=%==%SUPPORT_DIR% ( +if not "%SUPPORT_DIR:!=%"=="%SUPPORT_DIR%" ( echo Ghidra path cannot contain a "!" character. set ERRORLEVEL=1 goto exit1