[vlc-devel] [PATCH v2 2/13] platform: obey $TMPDIR on posix/linux/darwin in config_GetTempPath()

Thomas Guillem thomas at gllm.fr
Tue Oct 6 09:16:55 CEST 2020



On Tue, Oct 6, 2020, at 08:56, Steve Lhomme wrote:
> Why not put this directly in [1/3] ?

+1

> 
> On 2020-10-06 7:57, Lyndon Brown wrote:
> > From: Lyndon Brown <jnqnfe at gmail.com>
> > Date: Tue, 6 Oct 2020 01:51:10 +0100
> > Subject: platform: obey $TMPDIR on posix/linux/darwin in config_GetTempPath()
> > 
> > 
> > diff --git a/src/darwin/dirs.m b/src/darwin/dirs.m
> > index 74e2183b7a..1c27b68370 100644
> > --- a/src/darwin/dirs.m
> > +++ b/src/darwin/dirs.m
> > @@ -233,5 +233,6 @@ char *config_GetUserDir (vlc_userdir_t type)
> >   
> >   char *config_GetTempPath(void)
> >   {
> > -    return strdup("/tmp");
> > +    char *dir = getenv("TMPDIR");
> > +    return strdup((dir != NULL) ? dir : "/tmp");
> >   }
> > diff --git a/src/posix/dirs.c b/src/posix/dirs.c
> > index 995be9b3ce..c4456edc73 100644
> > --- a/src/posix/dirs.c
> > +++ b/src/posix/dirs.c
> > @@ -300,5 +300,6 @@ char *config_GetUserDir (vlc_userdir_t type)
> >   
> >   char *config_GetTempPath(void)
> >   {
> > -    return strdup("/tmp");
> > +    char *dir = getenv("TMPDIR");
> > +    return strdup((dir != NULL) ? dir : "/tmp");
> >   }
> > 
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> > 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list