فهرست منبع

* fix for standalone '~' with HOME=/ on Unix

git-svn-id: trunk@23499 -
Tomas Hajny 12 سال پیش
والد
کامیت
426050cb9f
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      rtl/inc/fexpand.inc

+ 1 - 1
rtl/inc/fexpand.inc

@@ -161,7 +161,7 @@ begin
             S := GetEnv ('HOME');
             S := GetEnv ('HOME');
   {$ENDIF FPC_FEXPAND_GETENV_PCHAR}
   {$ENDIF FPC_FEXPAND_GETENV_PCHAR}
  {$ENDIF FPC_FEXPAND_SYSUTILS}
  {$ENDIF FPC_FEXPAND_SYSUTILS}
-            if (S = '') or (Length (S) = 1)
+            if (S = '') or (Length (S) = 1) and (Length (Pa) > 1)
                                           and (S [1] = DirectorySeparator) then
                                           and (S [1] = DirectorySeparator) then
                 Delete (Pa, 1, 1)
                 Delete (Pa, 1, 1)
             else
             else