[MPlayer-cvslog] r34216 - trunk/playtreeparser.c

ib subversion at mplayerhq.hu
Thu Oct 20 13:12:41 CEST 2011


Author: ib
Date: Thu Oct 20 13:12:41 2011
New Revision: 34216

Log:
Prevent adding a base path wrongly.

X:\ at the beginning should only be considered
an absolute path in case of DOS style paths.

Modified:
   trunk/playtreeparser.c

Modified: trunk/playtreeparser.c
==============================================================================
--- trunk/playtreeparser.c	Thu Oct 20 12:41:31 2011	(r34215)
+++ trunk/playtreeparser.c	Thu Oct 20 13:12:41 2011	(r34216)
@@ -835,7 +835,11 @@ play_tree_add_basepath(play_tree_t* pt, 
     fl = strlen(pt->files[i]);
     // if we find a full unix path, url:// or X:\ at the beginning,
     // don't mangle it.
-    if(fl <= 0 || strstr(pt->files[i],"://") || (strstr(pt->files[i],":\\") == pt->files[i] + 1) || (pt->files[i][0] == '/') )
+    if(fl <= 0 || strstr(pt->files[i],"://") || (pt->files[i][0] == '/')
+#if HAVE_DOS_PATHS
+               || (strstr(pt->files[i],":\\") == pt->files[i] + 1)
+#endif
+                                                                        )
       continue;
     // if the path begins with \ then prepend drive letter to it.
     if (pt->files[i][0] == '\\') {


More information about the MPlayer-cvslog mailing list