changeset 34128:3a0badbaab9c

Prevent adding a base path wrongly. X:\ at the beginning should only be considered an absolute path in case of DOS style paths.
author ib
date Thu, 20 Oct 2011 11:12:41 +0000
parents 98f6d11e2ff3
children a7d1a3c3bc74
files playtreeparser.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/playtreeparser.c	Thu Oct 20 10:41:31 2011 +0000
+++ b/playtreeparser.c	Thu Oct 20 11:12:41 2011 +0000
@@ -835,7 +835,11 @@
     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] == '\\') {