Browse Source

* fixed fexpand('..')

peter 27 years ago
parent
commit
12de31dbe5
1 changed files with 5 additions and 4 deletions
  1. 5 4
      rtl/linux/linux.pp

+ 5 - 4
rtl/linux/linux.pp

@@ -2662,7 +2662,7 @@ Begin
       getdir(0,temp)
       getdir(0,temp)
      else
      else
       inc(i);
       inc(i);
-     temp:=temp+'/'+copy(path,i,length(path)-i+1);
+     temp:=temp+'/'+copy(path,i,length(path)-i+1)+'/';
    end;    
    end;    
 {First remove all references to '/./'}
 {First remove all references to '/./'}
   while pos('/./',temp)<>0 do
   while pos('/./',temp)<>0 do
@@ -2683,8 +2683,6 @@ Begin
        delete(temp,1,3);      
        delete(temp,1,3);      
   until i=0;
   until i=0;
 {Remove ending . and / which may exist}
 {Remove ending . and / which may exist}
-  if (length(temp)>0) and (temp[length(temp)]='.') then
-   dec(byte(temp[0]));
   if (length(temp)>0) and (temp[length(temp)]='/') then
   if (length(temp)>0) and (temp[length(temp)]='/') then
    dec(byte(temp[0]));
    dec(byte(temp[0]));
   fexpand:=temp;
   fexpand:=temp;
@@ -3123,7 +3121,10 @@ End.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.2  1998-04-04 17:07:17  michael
+  Revision 1.3  1998-04-07 12:27:41  peter
+    * fixed fexpand('..')
+
+  Revision 1.2  1998/04/04 17:07:17  michael
   + Fixed AssignStream, it completely refused to work
   + Fixed AssignStream, it completely refused to work
 
 
   Revision 1.1.1.1  1998/03/25 11:18:43  root
   Revision 1.1.1.1  1998/03/25 11:18:43  root