mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-04 17:58:18 +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
|
||||
Classes, SysUtils, LCLProc, LResources, Forms, Controls, Dialogs, FileProcs,
|
||||
FileUtil, Laz_XMLCfg,
|
||||
FileUtil, LazFileUtils, Laz_XMLCfg,
|
||||
{$IFNDEF OldXMLCfg}
|
||||
Laz2_XMLWrite,
|
||||
{$ELSE}
|
||||
@ -558,14 +558,16 @@ end;
|
||||
|
||||
function ForceDirectoryInteractive(Directory: string;
|
||||
ErrorButtons: TMsgDlgButtons): TModalResult;
|
||||
var i: integer;
|
||||
var
|
||||
i: integer;
|
||||
Dir: string;
|
||||
begin
|
||||
DoDirSeparators(Directory);
|
||||
Directory:=AppendPathDelim(Directory);
|
||||
if DirPathExists(Directory) then exit(mrOk);
|
||||
i:=1;
|
||||
while i<=length(Directory) do begin
|
||||
// skip UNC path
|
||||
i := Length(ExtractUNCVolume(Directory)) + 1;
|
||||
while i <= Length(Directory) do begin
|
||||
if Directory[i]=PathDelim then begin
|
||||
Dir:=copy(Directory,1,i-1);
|
||||
if not DirPathExists(Dir) then begin
|
||||
|
Loading…
Reference in New Issue
Block a user