aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2019-10-25 13:41:40 +0000
committers-ol <s-ol@users.noreply.github.com>2019-10-25 13:41:40 +0000
commit258c061d24a94f62b83e19fa0535a8bca8b284c3 (patch)
tree9e1da23e4f57d8df373850f1a6a85e90121141f8
parentadd ba_log entry 2019-10-24 (diff)
downloadmmm-258c061d24a94f62b83e19fa0535a8bca8b284c3.tar.gz
mmm-258c061d24a94f62b83e19fa0535a8bca8b284c3.zip
fix find_fileder
-rw-r--r--mmm/mmmfs/util.moon10
1 files changed, 5 insertions, 5 deletions
diff --git a/mmm/mmmfs/util.moon b/mmm/mmmfs/util.moon
index 176f4e6..eb5d025 100644
--- a/mmm/mmmfs/util.moon
+++ b/mmm/mmmfs/util.moon
@@ -14,12 +14,12 @@ tourl = (path) ->
find_fileder = (fileder, origin) ->
if 'string' == type fileder
- if '.' == fileder\sub 1, 1
- assert origin, "cannot resolve path '#{fileder}' without origin!"
- assert (origin\walk fileder), "couldn't resolve path '#{fileder}' from #{origin}"
+ if '/' == fileder\sub 1, 1
+ assert BROWSER and BROWSER.root, "cannot resolve absolute path '#{fileder}' without BROWSER and root set!"
+ assert (BROWSER.root\walk fileder), "couldn't resolve path '#{fileder}'"
else
- assert BROWSER and BROWSER.root, "cannot resolve path '#{fileder}' without BROWSER and root set!"
- assert (BROWSER.root\walk fileder), "couldn't resolve path '#{fileder}' from #{origin}"
+ assert origin, "cannot resolve relative path '#{fileder}' without origin!"
+ assert (origin\walk fileder), "couldn't resolve path '#{fileder}' from #{origin}"
else
assert fileder, "no fileder passed."