|
@@ -271,7 +271,11 @@ begin
|
|
|
|
|
|
// if no path is given use the current working dir, or try to lock the dir
|
|
// if no path is given use the current working dir, or try to lock the dir
|
|
if Path = '' then
|
|
if Path = '' then
|
|
- DirLock := CurrentDir(0)
|
|
|
|
|
|
+ begin
|
|
|
|
+ DirLock := CurrentDir(0);
|
|
|
|
+ if DirLock <> 0 then
|
|
|
|
+ CurrentDir(DirLock);
|
|
|
|
+ end
|
|
else
|
|
else
|
|
DirLock := Lock(PChar(Path), ACCESS_READ);
|
|
DirLock := Lock(PChar(Path), ACCESS_READ);
|
|
//
|
|
//
|