Skip to content

Commit 867cfee

Browse files
committed
Support backslashes in file paths
Signed-off-by: leonardus <leonardus@leonardus.me>
1 parent c30e672 commit 867cfee

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

gltf.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ function gltf.new(path)
218218
asset = json.decode(file)
219219
end
220220
assert(asset.asset.version:sub(1, 1) == "2", "incompatible glTF version")
221-
setmetatable(asset, {bin = bin, basePath = path:sub(1, path:find("/[^/]*$") or 0)})
221+
setmetatable(asset, {bin = bin, basePath = path:sub(1, path:find("[/\\][^/\\]*$") or 0)})
222222

223223
local meta = {}
224224
meta.swizzle = {__index = function(t, k)
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
rockspec_format = "3.0"
22
package = "lua-gltf"
3-
version = "1.0.0-2"
3+
version = "1.0.1-1"
44
description = {
55
summary = "glTF loader",
66
license = "zlib",
@@ -14,7 +14,8 @@ dependencies = {
1414
"base64 ~> 1"
1515
}
1616
source = {
17-
url = "git://github.com/leonardus/lua-gltf"
17+
url = "git://github.com/leonardus/lua-gltf",
18+
tag = "1.0.1"
1819
}
1920
build = {
2021
["type"] = "builtin",

0 commit comments

Comments
 (0)