mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 07:39:31 +02:00
rtl/amiga: in legacy MatchFirst, revert back to the original directory if we used CurrentDir(0), otherwise MatchFirst() will change the directory to SYS: (0 lock is a shortcut to the boot volume)
This commit is contained in:
parent
8a63e7ee5a
commit
27e9377a3a
@ -271,7 +271,11 @@ begin
|
||||
|
||||
// if no path is given use the current working dir, or try to lock the dir
|
||||
if Path = '' then
|
||||
DirLock := CurrentDir(0)
|
||||
begin
|
||||
DirLock := CurrentDir(0);
|
||||
if DirLock <> 0 then
|
||||
CurrentDir(DirLock);
|
||||
end
|
||||
else
|
||||
DirLock := Lock(PChar(Path), ACCESS_READ);
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user