libwine: Respect TMPDIR environment variable
Alexandre Julliard
julliard at winehq.org
Wed Sep 24 04:06:14 CDT 2014
André Hentschel <nerv at dawncrow.de> writes:
> @@ -36,7 +36,7 @@
> #include "wine/library.h"
>
> static const char server_config_dir[] = "/.wine"; /* config dir relative to $HOME */
> -static const char server_root_prefix[] = "/tmp/.wine"; /* prefix for server root dir */
> +static const char server_root_prefix[] = "/.wine"; /* prefix for server root dir */
> static const char server_dir_prefix[] = "/server-"; /* prefix for server dir */
>
> static char *bindir;
> @@ -220,15 +220,19 @@ static char *get_runtime_argvdir( const char *argv0 )
> /* initialize the server directory value */
> static void init_server_dir( dev_t dev, ino_t ino )
> {
> + const char* tmpdir;
> char *p, *root;
>
> + if (!(tmpdir = getenv("TMPDIR"))) tmpdir = "/tmp";
The server dir needs to be unique for a given prefix, so it cannot
depend on environment variables.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list