 +        }
 +
 +        return (double_slashed) ? ESCAPED_PATH : ROOTED_PATH;
-+    }
-+
-+    if (*it == '@') {
-+        return find_path_start_and_type(move(src, 1), true, end);
-+    }
-+
-+    if (*it == '"' || *it == '\'') {
-+        return find_path_start_and_type(move(src, 1), true, end);
 +    }
 +
 +    int starts_with_minus = (*it == '-');

+        }
+
+        if (isspace(*srcit)) {
+            if (prev_was_space) {
+                continue;
+            }
+
+            prev_was_space = true;
+            in_string2 = in_string;
+            sub_convert(&srcbeg, &srcit, &dstit, dstend, &in_string2);
+            srcbeg = srcit + 1;
+        }
+
+        if (!isspace(*srcit) && prev_was_space) {
+            prev_was_space = false;
+            srcbeg = srcit;
+            if (in_string != in_string2) {
+                srcbeg += 1;
+            }
+            in_string = in_string2;
+        }
+    }
+

+    ESCAPED_PATH,
+    ROOTED_PATH,
+    POSIX_PATH_LIST,
+    RELATIVE_PATH,
+    URL
+} path_type;
+
