Commit 14efc6eb authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

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

parent c441d574
...@@ -3115,9 +3115,19 @@ static void init_font_list(void) ...@@ -3115,9 +3115,19 @@ static void init_font_list(void)
ptr = valueA; ptr = valueA;
while (ptr) while (ptr)
{ {
const char* home;
LPSTR next = strchr( ptr, ':' ); LPSTR next = strchr( ptr, ':' );
if (next) *next++ = 0; 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; ptr = next;
} }
HeapFree( GetProcessHeap(), 0, valueA ); HeapFree( GetProcessHeap(), 0, valueA );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment