mirror of
https://github.com/love2d/love.git
synced 2026-08-13 17:10:54 +02:00
Removed extension and "."'s from default filesystem identity (issue #568)
This commit is contained in:
@@ -234,6 +234,9 @@ function love.boot()
|
||||
end
|
||||
local full_source = love.path.getfull(nouri)
|
||||
local leaf = love.path.leaf(full_source)
|
||||
leaf = leaf:gsub("^([%.]+)", "") -- strip leading "."'s
|
||||
leaf = leaf:gsub("%.([^%.]+)$", "") -- strip extension
|
||||
leaf = leaf:gsub("%.", "_") -- replace remaining "."'s with "_"
|
||||
love.filesystem.setIdentity(leaf)
|
||||
can_has_game = pcall(love.filesystem.setSource, full_source)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user