mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-10 18:52:19 +00:00
Fixed issues with imports that had ".." in the paths.
Reviewed by me.
This commit is contained in:
1 parent
1f64fce47c
commit
5a031efa7a
2 files changed
+4
-4
No files matched your search
@@ -65,9 +65,9 @@ require("file");
|
||||
if (resultsCount > 0 && results[resultsCount - 1] !== "..")
|
||||
results.pop();
|
||||
|
||||
// If we are at the beginning and this isn't a root listing,
|
||||
// add it since it makes sense for relative paths.
|
||||
else if (!isRoot && resultsCount < 0)
|
||||
// If this isn't a root listing, and we are preceded by only ..'s, or
|
||||
// nothing at all, then add it since it makes sense for relative paths.
|
||||
else if (!isRoot && resultsCount === 0 || results[resultsCount - 1] === "..")
|
||||
results.push(component);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user