Fix bug where lfcd.cmd does not CD to different drive (#221)
This commit is contained in:
parent
50ac367626
commit
bba32beb8a
12
etc/lfcd.cmd
12
etc/lfcd.cmd
@ -5,11 +5,11 @@ rem You need to put this file to a folder in %PATH% variable.
|
|||||||
|
|
||||||
:tmploop
|
:tmploop
|
||||||
set tmpfile="%tmp%\lf.%random%.tmp"
|
set tmpfile="%tmp%\lf.%random%.tmp"
|
||||||
if exist "%tmpfile%" goto:tmploop
|
if exist %tmpfile% goto:tmploop
|
||||||
lf -last-dir-path="%tmpfile%" %*
|
lf -last-dir-path=%tmpfile% %*
|
||||||
if not exist "%tmpfile%" exit
|
if not exist %tmpfile% exit
|
||||||
set /p dir=<"%tmpfile%"
|
set /p dir=<%tmpfile%
|
||||||
del /f "%tmpfile%"
|
del /f %tmpfile%
|
||||||
if not exist "%dir%" exit
|
if not exist "%dir%" exit
|
||||||
if "%dir%" == "%cd%" exit
|
if "%dir%" == "%cd%" exit
|
||||||
cd "%dir%"
|
cd /d "%dir%"
|
||||||
|
Loading…
Reference in New Issue
Block a user