Removed extension and "."'s from default filesystem identity (issue #568)

This commit is contained in:
Alex Szpakowski
2013-05-03 15:43:10 -03:00
parent 4c616e409b
commit c9003750fa
2 changed files with 15 additions and 0 deletions
+3
View File
@@ -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