Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > 6a4dd6b90514d0eb86e602b4d0285e66 > files > 2

libfm-0.1.12-4.fc13.src.rpm

diff --git a/src/base/fm-path.c b/src/base/fm-path.c
index 937a9d7..bae49fc 100644
--- a/src/base/fm-path.c
+++ b/src/base/fm-path.c
@@ -51,8 +51,11 @@ FmPath* fm_path_new(const char* path)
 
     if( path[0] == '/' ) /* if this is a absolute native path */
     {
-        if (path[1])
-            return fm_path_new_relative(root, path + 1);
+        /* handle the case where path begins with // */
+        while (*path == '/') path++;
+
+        if (*path)
+            return fm_path_new_relative(root, path);
         else
             /* special case: handle root dir */
             return fm_path_ref( root );