mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-06 09:58:16 +02:00
ide: take care about UNC path volumes while checking for a directory presence in IDE (issue #0020718)
git-svn-id: trunk@35914 -
This commit is contained in:
parent
4322f2fcf6
commit
36ca62c24c
@ -37,7 +37,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LCLProc, LResources, Forms, Controls, Dialogs, FileProcs,
|
Classes, SysUtils, LCLProc, LResources, Forms, Controls, Dialogs, FileProcs,
|
||||||
FileUtil, Laz_XMLCfg,
|
FileUtil, LazFileUtils, Laz_XMLCfg,
|
||||||
{$IFNDEF OldXMLCfg}
|
{$IFNDEF OldXMLCfg}
|
||||||
Laz2_XMLWrite,
|
Laz2_XMLWrite,
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
@ -558,14 +558,16 @@ end;
|
|||||||
|
|
||||||
function ForceDirectoryInteractive(Directory: string;
|
function ForceDirectoryInteractive(Directory: string;
|
||||||
ErrorButtons: TMsgDlgButtons): TModalResult;
|
ErrorButtons: TMsgDlgButtons): TModalResult;
|
||||||
var i: integer;
|
var
|
||||||
|
i: integer;
|
||||||
Dir: string;
|
Dir: string;
|
||||||
begin
|
begin
|
||||||
DoDirSeparators(Directory);
|
DoDirSeparators(Directory);
|
||||||
Directory:=AppendPathDelim(Directory);
|
Directory:=AppendPathDelim(Directory);
|
||||||
if DirPathExists(Directory) then exit(mrOk);
|
if DirPathExists(Directory) then exit(mrOk);
|
||||||
i:=1;
|
// skip UNC path
|
||||||
while i<=length(Directory) do begin
|
i := Length(ExtractUNCVolume(Directory)) + 1;
|
||||||
|
while i <= Length(Directory) do begin
|
||||||
if Directory[i]=PathDelim then begin
|
if Directory[i]=PathDelim then begin
|
||||||
Dir:=copy(Directory,1,i-1);
|
Dir:=copy(Directory,1,i-1);
|
||||||
if not DirPathExists(Dir) then begin
|
if not DirPathExists(Dir) then begin
|
||||||
|
Loading…
Reference in New Issue
Block a user