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

Lyndon Brown jnqnfe at gmail.com
Tue Oct 6 20:45:56 CEST 2020


As just commented in response to the patch #1 comment, which I'll
repeat here just for clarity, it was simply because the hard coded path
is what is currently in use, with the second patch enhancing it with
obeying $TMPDIR, with the purpose to allow simply dropping that if not
wanted.

Very happy to merge into the first patch if it is wanted, which I'm
getting the impression from the responses, it is.


On Tue, 2020-10-06 at 08:56 +0200, Steve Lhomme wrote:
> Why not put this directly in [1/3] ?
> 
> 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