[libdvdnav-devel] [PATCH 3/7] Use correct constant
Petri Hintukainen
phintuka at gmail.com
Fri May 22 12:01:22 CEST 2015
On to, 2015-05-21 at 22:44 +1200, Lawrence D'Oliveiro wrote:
> On Thu, 21 May 2015 11:36:58 +0300, Petri Hintukainen wrote:
>
> > On to, 2015-05-21 at 11:39 +1200, Lawrence D'Oliveiro wrote:
>
> >> Why is one of these “9-1” and the other “9”? Both strings are the
> >> same length.
> >
> > It preserves the slash in Windows. Without it ex. D:\VIDEO_TS would
> > become D: , not D:\ . But, don't ask why it is needed (the code was
> > like that before).
>
> It could matter (or could have mattered) that “D:” means “current
> directory on drive D”, while “D:\” means “root directory on drive D”.
>
> > In most Unix-like systems trailing slash must be removed or mount
> > point search won't work.
>
> I had a look at the source for the mountpoint(1) command, and it will
> work regardless of trailing slashes or repeated slashes.
dvd_reader.c uses getmntent() + strcmp(). That will fail if the strings
are not the same (= extra slashes etc.).
> > And there's another check that handles the special case when
> > VIDEO_TS is directly under root ...
>
> No doubt because under POSIX the pathname “/VIDEO_TS” is truncated to
> the empty string, which is invalid.
> _______________________________________________
> libdvdnav-devel mailing list
> libdvdnav-devel at videolan.org
> https://mailman.videolan.org/listinfo/libdvdnav-devel
More information about the libdvdnav-devel
mailing list