Browse Source

* Reverted r23400 and r23401. Tomas has promised to commit more correct fix to trunk.

git-svn-id: branches/targetandroid@23497 -
yury 12 years ago
parent
commit
e4dd41723c
2 changed files with 1 additions and 7 deletions
  1. 1 5
      rtl/inc/fexpand.inc
  2. 0 2
      tests/test/units/dos/tfexpand.pp

+ 1 - 5
rtl/inc/fexpand.inc

@@ -163,11 +163,7 @@ begin
  {$ENDIF FPC_FEXPAND_SYSUTILS}
  {$ENDIF FPC_FEXPAND_SYSUTILS}
             if (S = '') or (Length (S) = 1)
             if (S = '') or (Length (S) = 1)
                                           and (S [1] = DirectorySeparator) then
                                           and (S [1] = DirectorySeparator) then
-                begin
-                    Delete (Pa, 1, 1);
-                    if Copy(Pa, 1, 1) = DirectorySeparator then
-                        Delete (Pa, 1, 1);
-                end
+                Delete (Pa, 1, 1)
             else
             else
                 if S [Length (S)] = DirectorySeparator then
                 if S [Length (S)] = DirectorySeparator then
                     Pa := S + Copy (Pa, 3, Length (Pa) - 2)
                     Pa := S + Copy (Pa, 3, Length (Pa) - 2)

+ 0 - 2
tests/test/units/dos/tfexpand.pp

@@ -396,8 +396,6 @@ if CDir [Length (CDir)] = DirSep then Check ('c:anything', CDir + 'anything')
  Check (TestFileName, CurDir + DirSep + TestFileName);
  Check (TestFileName, CurDir + DirSep + TestFileName);
 {$IFDEF UNIX}
 {$IFDEF UNIX}
  S := GetEnv ('HOME');
  S := GetEnv ('HOME');
- if S = '' then
-   {$IFDEF DIRECT}System.{$ENDIF DIRECT}GetDir (0, S);
  { On m68k netbsd at least, HOME contains a final slash
  { On m68k netbsd at least, HOME contains a final slash
    remove it PM }
    remove it PM }
  if S[length(S)]=DirSep then
  if S[length(S)]=DirSep then