Browse Source

Amiga/AROS/MorphOS: some more path fixed in FV, userscreen for all 3 platforms

git-svn-id: trunk@28639 -
marcus 11 years ago
parent
commit
8c5c6588f2
2 changed files with 24 additions and 7 deletions
  1. 0 4
      ide/fpusrscr.pas
  2. 24 3
      packages/fv/src/stddlg.pas

+ 0 - 4
ide/fpusrscr.pas

@@ -1577,11 +1577,7 @@ begin
           UserScreen:=New(PNWLScreen, Init);
           UserScreen:=New(PNWLScreen, Init);
         {$else}
         {$else}
           {$ifdef AMIGASCREEN}
           {$ifdef AMIGASCREEN}
-            {$ifdef AROS}
             UserScreen:=New(PAmigaScreen, Init);
             UserScreen:=New(PAmigaScreen, Init);
-            {$else}
-            UserScreen:=nil; //New(PAmigaScreen, Init);
-            {$endif}
           {$else}
           {$else}
             UserScreen:=New(PScreen, Init);
             UserScreen:=New(PScreen, Init);
           {$endif AMIGASCREEN}
           {$endif AMIGASCREEN}

+ 24 - 3
packages/fv/src/stddlg.pas

@@ -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