mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 18:09:27 +02:00
* avoid cutting of HOME variable to 255 characters when compiled with $H+ (sysutils)
git-svn-id: trunk@3727 -
This commit is contained in:
parent
a9b515c0bf
commit
53103216ef
@ -161,11 +161,15 @@ begin
|
||||
if (Length (Pa) >= 1) and (Pa [1] = '~') and
|
||||
((Pa [2] = DirectorySeparator) or (Length (Pa) = 1)) then
|
||||
begin
|
||||
{$IFDEF FPC_FEXPAND_GETENV_PCHAR}
|
||||
{$IFOPT H-}
|
||||
{$IFDEF FPC_FEXPAND_GETENV_PCHAR}
|
||||
S := StrPas (GetEnv ('HOME'));
|
||||
{$ELSE FPC_FEXPAND_GETENV_PCHAR}
|
||||
{$ELSE FPC_FEXPAND_GETENV_PCHAR}
|
||||
{$ENDIF H-}
|
||||
S := GetEnv ('HOME');
|
||||
{$ENDIF FPC_FEXPAND_GETENV_PCHAR}
|
||||
{$IFOPT H-}
|
||||
{$ENDIF FPC_FEXPAND_GETENV_PCHAR}
|
||||
{$ENDIF H-}
|
||||
if (S = '') or (Length (S) = 1)
|
||||
and (S [1] = DirectorySeparator) then
|
||||
Delete (Pa, 1, 1)
|
||||
|
Loading…
Reference in New Issue
Block a user