NFI42KGXEHTNACH2CATBLJIAXJYNV2C3QBPR2ORPJZKOVEREVM7QC function is_absolute_path(path)local os_path_separator = package.config:sub(1,1)if os_path_separator == '/' then-- POSIX systems permit backslashes in filenamesreturn path:sub(1,1) == '/'elseif os_path_separator == '\\' thenlocal f = path:sub(1,1)return f == '/' or f == '\\'elseerror('What OS is this? LÖVE reports that the path separator is "'..os_path_separator..'"')endendfunction is_relative_path(path)return not is_absolute_path(path)end
local os_path_separator = package.config:sub(1,1)if filename:sub(1,1) ~= os_path_separator thenfilename = love.filesystem.getWorkingDirectory()..os_path_separator..filename
if is_relative_path(filename) thenfilename = love.filesystem.getWorkingDirectory()..'/'..filename -- '/' should work even on Windows
local os_path_separator = package.config:sub(1,1)if filename:sub(1,1) ~= os_path_separator thenfilename = love.filesystem.getWorkingDirectory()..os_path_separator..filename
if is_relative_path(filename) thenfilename = love.filesystem.getWorkingDirectory()..'/'..filename -- '/' should work even on Windows
function is_absolute_path(path)local os_path_separator = package.config:sub(1,1)if os_path_separator == '/' then-- POSIX systems permit backslashes in filenamesreturn path:sub(1,1) == '/'elseif os_path_separator == '\\' thenlocal f = path:sub(1,1)return f == '/' or f == '\\'elseerror('What OS is this? LÖVE reports that the path separator is "'..os_path_separator..'"')endendfunction is_relative_path(path)return not is_absolute_path(path)end