Commits

Alex Szpakowski committed fc6adf7

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

Comments (0)

Files changed (2)

src/scripts/boot.lua

 		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

src/scripts/boot.lua.h

 	0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x65, 0x61, 0x66, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x76, 
 	0x65, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x6c, 0x65, 0x61, 0x66, 0x28, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x73, 
 	0x6f, 0x75, 0x72, 0x63, 0x65, 0x29, 0x0a,
+	0x09, 0x09, 0x6c, 0x65, 0x61, 0x66, 0x20, 0x3d, 0x20, 0x6c, 0x65, 0x61, 0x66, 0x3a, 0x67, 0x73, 0x75, 0x62, 
+	0x28, 0x22, 0x5e, 0x28, 0x5b, 0x25, 0x2e, 0x5d, 0x2b, 0x29, 0x22, 0x2c, 0x20, 0x22, 0x22, 0x29, 0x20, 0x2d, 
+	0x2d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x70, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x22, 0x2e, 
+	0x22, 0x27, 0x73, 0x0a,
+	0x09, 0x09, 0x6c, 0x65, 0x61, 0x66, 0x20, 0x3d, 0x20, 0x6c, 0x65, 0x61, 0x66, 0x3a, 0x67, 0x73, 0x75, 0x62, 
+	0x28, 0x22, 0x25, 0x2e, 0x28, 0x5b, 0x5e, 0x25, 0x2e, 0x5d, 0x2b, 0x29, 0x24, 0x22, 0x2c, 0x20, 0x22, 0x22, 
+	0x29, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x70, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 
+	0x6f, 0x6e, 0x0a,
+	0x09, 0x09, 0x6c, 0x65, 0x61, 0x66, 0x20, 0x3d, 0x20, 0x6c, 0x65, 0x61, 0x66, 0x3a, 0x67, 0x73, 0x75, 0x62, 
+	0x28, 0x22, 0x25, 0x2e, 0x22, 0x2c, 0x20, 0x22, 0x5f, 0x22, 0x29, 0x20, 0x2d, 0x2d, 0x20, 0x72, 0x65, 0x70, 
+	0x6c, 0x61, 0x63, 0x65, 0x20, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x22, 0x2e, 0x22, 
+	0x27, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x22, 0x5f, 0x22, 0x0a,
 	0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 
 	0x73, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x28, 0x6c, 0x65, 0x61, 0x66, 0x29, 0x0a,
 	0x09, 0x09, 0x63, 0x61, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x5f, 0x67, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x70,