Skip to content
This repository was archived by the owner on Dec 10, 2018. It is now read-only.

Commit ff0b95e

Browse files
committed
Fix: ESD is not renamed properly when having full path
and other stuff
1 parent 976005d commit ff0b95e

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

decrypt.bat

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ IF %ERRORTEMP% NEQ 0 (
186186
rmdir /s /q ISOFOLDER\
187187
IF EXIST "%ESD%.bak" (
188188
del /f /q "%ESD%" >nul 2>&1
189-
ren "%ESD%.bak" %ESD%
189+
for %%f in (%ESD%) do ren "%ESD%.bak" %%~nf.esd
190190
)
191191
echo.
192192
echo Press any key to exit.
@@ -266,13 +266,17 @@ if %build% GEQ 9896 (
266266
exit /b
267267

268268
:error
269-
269+
if exist ISOFOLDER\nul rmdir /s /q ISOFOLDER\
270+
IF EXIST "%ESD%.bak" (
271+
del /f /q "%ESD%" >nul 2>&1
272+
for %%f in (%ESD%) do ren "%ESD%.bak" %%~nf.esd
273+
)
270274
exit /b
271275

272276
:help
273277
echo.
274278
echo Usage: %~n0
275-
echo /Mode:^<Option^> ^<Options^>
279+
echo /Mode:^<Mode^> ^<Options^>
276280
echo.
277281
echo Available modes :
278282
echo.

0 commit comments

Comments
 (0)