diff options
author | marha <marha@users.sourceforge.net> | 2011-01-18 14:39:54 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-01-18 14:39:54 +0000 |
commit | 75dc8a3966e1da6f1927808ca442b17af1789ccb (patch) | |
tree | 012a9a5be22b69a4f7adf18263440522b7f11099 /libXt/src | |
parent | dd093d095ab5a778fd51133a42ea42a9cd8df2af (diff) | |
download | vcxsrv-75dc8a3966e1da6f1927808ca442b17af1789ccb.tar.gz vcxsrv-75dc8a3966e1da6f1927808ca442b17af1789ccb.tar.bz2 vcxsrv-75dc8a3966e1da6f1927808ca442b17af1789ccb.zip |
On windows also use a path for the app user defaults
Diffstat (limited to 'libXt/src')
-rw-r--r-- | libXt/src/Initialize.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/libXt/src/Initialize.c b/libXt/src/Initialize.c index 43acc357d..1e5e261fb 100644 --- a/libXt/src/Initialize.c +++ b/libXt/src/Initialize.c @@ -387,19 +387,23 @@ static void CombineAppUserDefaults( Boolean deallocate = False; if (!(path = getenv("XUSERFILESEARCHPATH"))) { + char *old_path=NULL; + char homedir[PATH_MAX]="."; #if !defined(WIN32) || !defined(__MINGW32__) - char *old_path; - char homedir[PATH_MAX]; GetRootDirName(homedir, PATH_MAX); - if (!(old_path = getenv("XAPPLRESDIR"))) { + if (!(old_path = getenv("XAPPLRESDIR"))) +#endif + { char *path_default = "%s/%%L/%%N%%C:%s/%%l/%%N%%C:%s/%%N%%C:%s/%%L/%%N:%s/%%l/%%N:%s/%%N"; if (!(path = ALLOCATE_LOCAL(6*strlen(homedir) + strlen(path_default)))) _XtAllocError(NULL); sprintf( path, path_default, homedir, homedir, homedir, homedir, homedir, homedir ); - } else { - char *path_default = "%s/%%L/%%N%%C:%s/%%l/%%N%%C:%s/%%N%%C:%s/%%N%%C:%s/%%L/%%N:%s/%%l/%%N:%s/%%N:%s/%%N"; + } +#if !defined(WIN32) || !defined(__MINGW32__) + else + { char *path_default = "%s/%%L/%%N%%C:%s/%%l/%%N%%C:%s/%%N%%C:%s/%%N%%C:%s/%%L/%%N:%s/%%l/%%N:%s/%%N:%s/%%N"; if (!(path = ALLOCATE_LOCAL( 6*strlen(old_path) + 2*strlen(homedir) + strlen(path_default)))) @@ -407,8 +411,8 @@ static void CombineAppUserDefaults( sprintf(path, path_default, old_path, old_path, old_path, homedir, old_path, old_path, old_path, homedir ); } - deallocate = True; #endif + deallocate = True; } filename = XtResolvePathname(dpy, NULL, NULL, NULL, path, NULL, 0, NULL); |