Browse Source

* fix by Charlie correcting treatment of a trailing directory separator on Amiga(-likes)

git-svn-id: trunk@30653 -
Tomas Hajny 10 năm trước cách đây
mục cha
commit
23300b8a41
1 tập tin đã thay đổi với 2 bổ sung18 xóa
  1. 2 18
      rtl/inc/fexpand.inc

+ 2 - 18
rtl/inc/fexpand.inc

@@ -479,7 +479,7 @@ begin
 {$ENDIF FPC_FEXPAND_NO_DOTS_UPDIR}
 {$ENDIF FPC_FEXPAND_NO_DOTS_UPDIR}
 
 
 {$IFDEF FPC_FEXPAND_UPDIR_HELPER}
 {$IFDEF FPC_FEXPAND_UPDIR_HELPER}
-    (* Now remove all references to '//' plus previous directories... *)
+    { Now remove all references to '//' or '::' plus previous directories... }
     I := Pos (DirectorySeparator + DirectorySeparator, Dirs);
     I := Pos (DirectorySeparator + DirectorySeparator, Dirs);
     while I <> 0 do
     while I <> 0 do
         begin
         begin
@@ -507,22 +507,6 @@ begin
         end;
         end;
 {$ENDIF FPC_FEXPAND_NO_DOTS_UPDIR}
 {$ENDIF FPC_FEXPAND_NO_DOTS_UPDIR}
 
 
-{$IFDEF FPC_FEXPAND_DIRSEP_IS_UPDIR}
-    (* Remove a possible reference to '/' at the *)
-    (* end of line plus the previous directory.  *)
-    I := Length (Dirs);
-    if (I > 0) and (Dirs [I] = DirectorySeparator) then
-        begin
-            J := Pred (I);
-            while (J > 0) and (Dirs [J] <> DirectorySeparator) do
-                Dec (J);
-            if (J = 0) then
-                Dirs := ''
-            else
-                Delete (Dirs, J, Succ (I - J));
-        end;
-{$ENDIF FPC_FEXPAND_DIRSEP_IS_UPDIR}
-
 {$IFNDEF FPC_FEXPAND_NO_CURDIR}
 {$IFNDEF FPC_FEXPAND_NO_CURDIR}
  {$IFNDEF FPC_FEXPAND_DIRSEP_IS_CURDIR}
  {$IFNDEF FPC_FEXPAND_DIRSEP_IS_CURDIR}
     {...and also a possible reference to '\.'}
     {...and also a possible reference to '\.'}
@@ -666,7 +650,7 @@ end;
    parent directory and so on (Amiga). Please, note that you can decide
    parent directory and so on (Amiga). Please, note that you can decide
    to support both '..' and DirectorySeparator as references to the parent
    to support both '..' and DirectorySeparator as references to the parent
    directory at the same time for compatibility reasons - however this
    directory at the same time for compatibility reasons - however this
-   support makes it impossible to use anotherwise possibly valid name
+   support makes it impossible to use otherwise possibly valid name
    of '..'.
    of '..'.
 
 
    FPC_FEXPAND_DIRSEP_IS_CURDIR - DirectorySeparator at the beginning of
    FPC_FEXPAND_DIRSEP_IS_CURDIR - DirectorySeparator at the beginning of