gdi32: Allow ~-based paths in HKCU\Software\Wine\Fonts:Path.

This commit is contained in:
Ken Thomases 2011-10-26 12:27:51 -05:00 committed by Alexandre Julliard
parent c441d57452
commit 14efc6eb24
1 changed files with 11 additions and 1 deletions

View File

@ -3115,9 +3115,19 @@ static void init_font_list(void)
ptr = valueA;
while (ptr)
{
const char* home;
LPSTR next = strchr( ptr, ':' );
if (next) *next++ = 0;
ReadFontDir( ptr, TRUE );
if (ptr[0] == '~' && ptr[1] == '/' && (home = getenv( "HOME" )) &&
(unixname = HeapAlloc( GetProcessHeap(), 0, strlen(ptr) + strlen(home) )))
{
strcpy( unixname, home );
strcat( unixname, ptr + 1 );
ReadFontDir( unixname, TRUE );
HeapFree( GetProcessHeap(), 0, unixname );
}
else
ReadFontDir( ptr, TRUE );
ptr = next;
}
HeapFree( GetProcessHeap(), 0, valueA );