Skip to content

Commit b1b9bd2

Browse files
committed
Merge branch 'master' into development
2 parents e2784bc + a7c0e06 commit b1b9bd2

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

vendor/lib/lib_path.cmd

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,12 @@ exit /b
127127
exit /b
128128

129129
:toolong
130-
echo "%OLD_PATH%">"%temp%\cmder_lib_pathA"
131-
echo "%PATH%">"%temp%\cmder_lib_pathB"
132-
fc /b "%temp%\cmder_lib_pathA" "%temp%\cmder_lib_pathB" 2>nul 1>nul
133-
if errorlevel 1 ( del "%temp%\cmder_lib_pathA" & del "%temp%\cmder_lib_pathB" & goto :changed )
134-
del "%temp%\cmder_lib_pathA" & del "%temp%\cmder_lib_pathB"
130+
set "_rand=%RANDOM%"
131+
echo "%OLD_PATH%">"%temp%\%_rand%_cmder_lib_pathA"
132+
echo "%PATH%">"%temp%\%_rand%_cmder_lib_pathB"
133+
fc /b "%temp%\%_rand%_cmder_lib_pathA" "%temp%\%_rand%_cmder_lib_pathB" 2>nul 1>nul
134+
if errorlevel 1 ( del "%temp%\%_rand%_cmder_lib_pathA" & del "%temp%\%_rand%_cmder_lib_pathB" & set "_rand=" & goto :changed )
135+
del "%temp%\%_rand%_cmder_lib_pathA" & del "%temp%\%_rand%_cmder_lib_pathB" & set "_rand="
135136
exit /b
136137

137138
:changed

0 commit comments

Comments
 (0)