From fbe3e17eea2d369d8c8dfa030e2efea9ff0c4462 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sun, 6 Nov 2022 11:30:56 +0330 Subject: [PATCH] add check for config dir --- Cmder.bat | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Cmder.bat b/Cmder.bat index 36d29d7..d48b0ee 100644 --- a/Cmder.bat +++ b/Cmder.bat @@ -5,7 +5,12 @@ SET CMDER_ROOT=%~dp0 @if "%CMDER_ROOT:~-1%" == "\" SET CMDER_ROOT=%CMDER_ROOT:~0,-1% if not exist "%CMDER_ROOT%\config\user_ConEmu.xml" ( - copy "%CMDER_ROOT%\vendor\ConEmu.xml.default" "%CMDER_ROOT%\config\user_ConEmu.xml" + if not exist "%CMDER_ROOT%\config" mkdir "%CMDER_ROOT%\config" 2>nul + copy "%CMDER_ROOT%\vendor\ConEmu.xml.default" "%CMDER_ROOT%\config\user_ConEmu.xml" 1>nul + if %errorlevel% neq 0 ( + echo ERROR: CMDER Initialization has Failed + exit /b 1 + ) ) if exist "%~1" (