mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-19 10:09:19 +02:00
* support also ansistring
git-svn-id: trunk@3619 -
This commit is contained in:
parent
77c4459fd1
commit
b5647cff88
@ -50,7 +50,7 @@
|
|||||||
{$DEFINE FPC_FEXPAND_UPDIR_HELPER}
|
{$DEFINE FPC_FEXPAND_UPDIR_HELPER}
|
||||||
{$ENDIF FPC_FEXPAND_DIRSEP_IS_UPDIR}
|
{$ENDIF FPC_FEXPAND_DIRSEP_IS_UPDIR}
|
||||||
|
|
||||||
procedure GetDirIO (DriveNr: byte; var Dir: OpenString);
|
procedure GetDirIO (DriveNr: byte; var Dir: String);
|
||||||
|
|
||||||
(* GetDirIO is supposed to return the root of the given drive *)
|
(* GetDirIO is supposed to return the root of the given drive *)
|
||||||
(* in case of an error for compatibility of FExpand with TP/BP. *)
|
(* in case of an error for compatibility of FExpand with TP/BP. *)
|
||||||
@ -442,7 +442,7 @@ begin
|
|||||||
else
|
else
|
||||||
if (Length (Dirs) <> 0) and (Dirs [Length (Dirs)] = '.') and
|
if (Length (Dirs) <> 0) and (Dirs [Length (Dirs)] = '.') and
|
||||||
(Dirs [Pred (Length (Dirs))] = DirectorySeparator) then
|
(Dirs [Pred (Length (Dirs))] = DirectorySeparator) then
|
||||||
Dec (Dirs [0], 2);
|
Delete (Dirs,length(Dirs)-1,2);
|
||||||
|
|
||||||
{Finally remove '.\' at the beginning of the string of directories...}
|
{Finally remove '.\' at the beginning of the string of directories...}
|
||||||
while (Length (Dirs) >= 2) and (Dirs [1] = '.')
|
while (Length (Dirs) >= 2) and (Dirs [1] = '.')
|
||||||
@ -499,7 +499,7 @@ begin
|
|||||||
and (Length (Path) <> 0)
|
and (Length (Path) <> 0)
|
||||||
and (Path [Length (Path)] <> DirectorySeparator)
|
and (Path [Length (Path)] <> DirectorySeparator)
|
||||||
then
|
then
|
||||||
Dec (Pa [0]);
|
Delete (PA,length(PA),1);
|
||||||
{$ENDIF FPC_FEXPAND_DIRSEP_IS_UPDIR}
|
{$ENDIF FPC_FEXPAND_DIRSEP_IS_UPDIR}
|
||||||
|
|
||||||
FExpand := Pa;
|
FExpand := Pa;
|
||||||
|
Loading…
Reference in New Issue
Block a user