[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: libwine: Respect TMPDIR environment variable
From:       Alexandre Julliard <julliard () winehq ! org>
Date:       2014-09-24 9:06:14
Message-ID: 87a95pbd6h.fsf () wine ! dyndns ! org
[Download RAW message or body]

André Hentschel <nerv@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@winehq.org



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic