Ver Fonte

* Fixed expanding ~ if there is no HOME env var set.

git-svn-id: branches/targetandroid@23400 -
yury há 12 anos atrás
pai
commit
8333a4d000
1 ficheiros alterados com 5 adições e 1 exclusões
  1. 5 1
      rtl/inc/fexpand.inc

+ 5 - 1
rtl/inc/fexpand.inc

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