Re: [MPlayer-dev-eng] [PATCH] Subtitles directories
On Sun, Nov 21, 2010 at 02:08:21PM -0500, Paul Arthur wrote:
On 2010-11-21, Clément Bœsch <ubitux@gmail.com> wrote:
On Sun, Nov 21, 2010 at 12:05:58PM +0100, Cl=C3=A9ment B=C5=93sch wrote:
On Sat, Nov 20, 2010 at 09:49:44PM +0100, Reimar D=C3=B6ffinger wrote:
Either way, that part is ok. Except for one thing I noticed while looking through the next patch: For DOS paths you must also consider ':' a path separator in mp_basename, so that c:test.avi is treated correctly.
OK, then I'll commit this, and make a second patch to fix that.
But since c:test.avi must be supported, I wonder if c:foo:test.avi has to
Not for DOS/Windows. The difference between C:test.avi and C:\test.avi is that the first one says "I want test.avi in the current working directory on drive C" (each drive has its own CWD, you see) while the second one specifies an absolute path. ':' is not a valid filename character so there's no ambiguity; ':' can only appear once in a valid DOS filename, and only as part of the drive specification.
Indeed. http://msdn.microsoft.com/en-us/library/aa365247%28v=VS.85%29.aspx confirms this. Thanks.
The current patch consider ':' as a normal path separator, just like subreader.c does, but maybe a smarter thing must be done?
Should be fine.
OK, applied.
Index: path.c =================================================================== --- path.c (revision 32641) +++ path.c (working copy) @@ -202,6 +202,9 @@ s = strrchr(path, '\\'); if (s) path = s + 1; + s = strrchr(path, ':'); + if (s) + path = s + 1; #endif s = strrchr(path, '/'); return s ? s + 1 : path;
_______________________________________________ MPlayer-dev-eng mailing list MPlayer-dev-eng@mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
-- Clément B. Not sent from a jesusPhone.
participants (1)
-
Clément Bœsch