mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-03 21:58:36 +02:00
* more generic fix for DriveSeparator = DirectorySeparator
This commit is contained in:
parent
cca310e33d
commit
64a9b00709
@ -254,12 +254,13 @@ begin
|
|||||||
|
|
||||||
{ Find the first DirectorySeparator or DriveSeparator from the end. }
|
{ Find the first DirectorySeparator or DriveSeparator from the end. }
|
||||||
DirEnd := Length (Path);
|
DirEnd := Length (Path);
|
||||||
while (DirEnd > 0) and not (Path [DirEnd] in
|
{ Avoid problems with platforms having DriveSeparator = DirectorySeparator. }
|
||||||
{$IFNDEF MACOS}
|
if DirectorySeparator = DriveSeparator then
|
||||||
|
while (DirEnd > 0) and not (Path [DirEnd] in [DirectorySeparator]) do
|
||||||
|
Dec (DirEnd)
|
||||||
|
else
|
||||||
|
while (DirEnd > 0) and not (Path [DirEnd] in
|
||||||
[DirectorySeparator, DriveSeparator]) do
|
[DirectorySeparator, DriveSeparator]) do
|
||||||
{$ELSE}
|
|
||||||
[DirectorySeparator]) do
|
|
||||||
{$ENDIF}
|
|
||||||
Dec (DirEnd);
|
Dec (DirEnd);
|
||||||
|
|
||||||
{ The first "extension" should be returned if LFN }
|
{ The first "extension" should be returned if LFN }
|
||||||
@ -302,7 +303,10 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.4 2004-12-28 21:50:14 olle
|
Revision 1.5 2004-12-29 19:10:47 hajny
|
||||||
|
* more generic fix for DriveSeparator = DirectorySeparator
|
||||||
|
|
||||||
|
Revision 1.4 2004/12/28 21:50:14 olle
|
||||||
* hack to make macos compile
|
* hack to make macos compile
|
||||||
|
|
||||||
Revision 1.3 2004/12/15 17:03:01 peter
|
Revision 1.3 2004/12/15 17:03:01 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user