lazutils: ExpandFileNameUTF8: fixed HOME with UTF-8

git-svn-id: trunk@53283 -
This commit is contained in:
mattias 2016-11-02 11:13:07 +00:00
parent d0c5c53609
commit 887269a2be

View File

@ -218,7 +218,7 @@ begin
CurDir := GetCurrentDirUtf8;
if ((Length(Fn) > 1) and (Fn[1] = '~') and (Fn[2] = '/')) or (Fn = '~') then
begin
HomeDir := SysToUtf8(GetEnvironmentVariable('HOME'));
HomeDir := GetEnvironmentVariableUTF8('HOME');
if not FileNameIsUnixAbsolute(HomeDir) then
HomeDir := ExpandFileNameUtf8(HomeDir,'');
Fn := HomeDir + Copy(Fn,2,length(Fn));