|
@@ -1292,7 +1292,11 @@ end;
|
|
function RelativePath(var S: PathStr): Boolean;
|
|
function RelativePath(var S: PathStr): Boolean;
|
|
begin
|
|
begin
|
|
S := LTrim(RTrim(S));
|
|
S := LTrim(RTrim(S));
|
|
|
|
+ {$ifdef HASAMIGA}
|
|
|
|
+ RelativePath := Pos(DriveSeparator, S) = 0;
|
|
|
|
+ {$ELSE}
|
|
RelativePath := not ((S <> '') and ((S[1] = DirSeparator) or (S[2] = ':')));
|
|
RelativePath := not ((S <> '') and ((S[1] = DirSeparator) or (S[2] = ':')));
|
|
|
|
+ {$ENDIF}
|
|
end;
|
|
end;
|
|
|
|
|
|
{ try to reduce the length of S+dir as a file path+pattern }
|
|
{ try to reduce the length of S+dir as a file path+pattern }
|
|
@@ -2169,7 +2173,12 @@ begin
|
|
CurDir := ''
|
|
CurDir := ''
|
|
else begin
|
|
else begin
|
|
CurDir := DirInput^.Data^;
|
|
CurDir := DirInput^.Data^;
|
|
- if (CurDir[Length(CurDir)] <> DirSeparator) then
|
|
|
|
|
|
+
|
|
|
|
+ if (CurDir[Length(CurDir)] <> DirSeparator)
|
|
|
|
+ {$IFDEF HASAMIGA}
|
|
|
|
+ and (CurDir[Length(CurDir)] <> DriveSeparator)
|
|
|
|
+ {$endif}
|
|
|
|
+ then
|
|
CurDir := CurDir + DirSeparator;
|
|
CurDir := CurDir + DirSeparator;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
@@ -2395,7 +2404,11 @@ begin
|
|
ExtractDir := '';
|
|
ExtractDir := '';
|
|
Exit;
|
|
Exit;
|
|
end;
|
|
end;
|
|
- if D[Byte(D[0])] <> DirSeparator then
|
|
|
|
|
|
+ if (D[Byte(D[0])] <> DirSeparator)
|
|
|
|
+ {$ifdef HASAMIGA}
|
|
|
|
+ and (D[Byte(D[0])] <> DriveSeparator)
|
|
|
|
+ {$endif}
|
|
|
|
+ then
|
|
D := D + DirSeparator;
|
|
D := D + DirSeparator;
|
|
ExtractDir := D;
|
|
ExtractDir := D;
|
|
end;
|
|
end;
|
|
@@ -2478,7 +2491,11 @@ begin
|
|
{$ifdef Unix}
|
|
{$ifdef Unix}
|
|
Is:=(S=DirSeparator); { handle root }
|
|
Is:=(S=DirSeparator); { handle root }
|
|
{$else}
|
|
{$else}
|
|
|
|
+ {$ifdef HASAMIGA}
|
|
|
|
+ Is := (Length(S) > 0) and (S[Length(S)] = DriveSeparator);
|
|
|
|
+ {$else}
|
|
Is:=(length(S)=3) and (Upcase(S[1]) in['A'..'Z']) and (S[2]=':') and (S[3]=DirSeparator);
|
|
Is:=(length(S)=3) and (Upcase(S[1]) in['A'..'Z']) and (S[2]=':') and (S[3]=DirSeparator);
|
|
|
|
+ {$endif}
|
|
{ handle root dirs }
|
|
{ handle root dirs }
|
|
{$endif}
|
|
{$endif}
|
|
if Is=false then
|
|
if Is=false then
|
|
@@ -2718,7 +2735,11 @@ begin
|
|
if (i = 0) then
|
|
if (i = 0) then
|
|
AFile := AFile + D1
|
|
AFile := AFile + D1
|
|
else AFile := AFile + Copy(D1,Succ(i),Length(D1)-i);
|
|
else AFile := AFile + Copy(D1,Succ(i),Length(D1)-i);
|
|
- if AFile[Length(AFile)] <> DirSeparator then
|
|
|
|
|
|
+ if (AFile[Length(AFile)] <> DirSeparator)
|
|
|
|
+ {$ifdef HASAMIGA}
|
|
|
|
+ and (AFile[Length(AFile)] <> DriveSeparator)
|
|
|
|
+ {$endif}
|
|
|
|
+ then
|
|
AFile := AFile + DirSeparator;
|
|
AFile := AFile + DirSeparator;
|
|
if Length(AFile)+Length(N1)+Length(E1) <= MaxLen then
|
|
if Length(AFile)+Length(N1)+Length(E1) <= MaxLen then
|
|
AFile := AFile + N1 + E1
|
|
AFile := AFile + N1 + E1
|