winemenubuilder: generate new menus in the right directory

Alexandre Julliard julliard at winehq.org
Thu Jun 11 05:09:53 CDT 2009


Damjan Jovanovic <damjan.jov at gmail.com> writes:

> @@ -882,7 +882,11 @@ static BOOL write_menu_file(const char *filename)
>  
>      while (1)
>      {
> +        char *tmpdir = getenv("TMPDIR");
> +        unsetenv("TMPDIR");
>          tempfilename = tempnam(xdg_config_dir, "_wine");
> +        if (tmpdir)
> +            setenv("TMPDIR", tmpdir, 1);

That's ugly. You should use mkstemps() or something like that.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list