diff options
Diffstat (limited to 'src/url.lua')
-rw-r--r-- | src/url.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/url.lua b/src/url.lua index 0ecec3c..4d2bfa7 100644 --- a/src/url.lua +++ b/src/url.lua | |||
@@ -143,8 +143,8 @@ function Public.parse_path(path) | |||
143 | for i = 1, table.getn(parsed) do | 143 | for i = 1, table.getn(parsed) do |
144 | parsed[i] = Code.unescape(parsed[i]) | 144 | parsed[i] = Code.unescape(parsed[i]) |
145 | end | 145 | end |
146 | if stringsub(path, 1, 1) == "/" then parsed.is_absolute = 1 end | 146 | if string.sub(path, 1, 1) == "/" then parsed.is_absolute = 1 end |
147 | if stringsub(path, -1, -1) == "/" then parsed.is_directory = 1 end | 147 | if string.sub(path, -1, -1) == "/" then parsed.is_directory = 1 end |
148 | return parsed | 148 | return parsed |
149 | end | 149 | end |
150 | 150 | ||
@@ -214,7 +214,7 @@ end | |||
214 | -- corresponding absolute path | 214 | -- corresponding absolute path |
215 | ----------------------------------------------------------------------------- | 215 | ----------------------------------------------------------------------------- |
216 | function Private.absolute_path(base_path, relative_path) | 216 | function Private.absolute_path(base_path, relative_path) |
217 | if stringsub(relative_path, 1, 1) == "/" then return relative_path end | 217 | if string.sub(relative_path, 1, 1) == "/" then return relative_path end |
218 | local path = string.gsub(base_path, "[^/]*$", "") | 218 | local path = string.gsub(base_path, "[^/]*$", "") |
219 | path = path .. relative_path | 219 | path = path .. relative_path |
220 | path = string.gsub(path, "([^/]*%./)", function (s) | 220 | path = string.gsub(path, "([^/]*%./)", function (s) |