mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-03 08:51:39 +01:00
* fix problem with network drives
This commit is contained in:
parent
f14e276fc7
commit
6a58091c67
@ -2519,8 +2519,11 @@ begin
|
||||
FindFirst(ExpPath, Directory, SR);
|
||||
PathValid := (DosError = 0) and (SR.Attr and Directory <> 0);
|
||||
{$ifdef NetDrive}
|
||||
if (DosError=66) or (DosError=123) then
|
||||
if (DosError<>0) and (length(ExpPath)>2) and
|
||||
(ExpPath[1]='\') and (ExpPath[2]='\')then
|
||||
begin
|
||||
{ Checking '\\machine\sharedfolder' directly always fails..
|
||||
rather try '\\machine\sharedfolder\*' PM }
|
||||
{$ifdef fpc}
|
||||
FindClose(SR);
|
||||
{$endif}
|
||||
|
||||
@ -2519,8 +2519,11 @@ begin
|
||||
FindFirst(ExpPath, Directory, SR);
|
||||
PathValid := (DosError = 0) and (SR.Attr and Directory <> 0);
|
||||
{$ifdef NetDrive}
|
||||
if (DosError=66) or (DosError=123) then
|
||||
if (DosError<>0) and (length(ExpPath)>2) and
|
||||
(ExpPath[1]='\') and (ExpPath[2]='\')then
|
||||
begin
|
||||
{ Checking '\\machine\sharedfolder' directly always fails..
|
||||
rather try '\\machine\sharedfolder\*' PM }
|
||||
{$ifdef fpc}
|
||||
FindClose(SR);
|
||||
{$endif}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user