From 511db8cffd808d244aa84095bcde83def48736e0 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 10 Sep 2022 19:23:34 -0700 Subject: bugfix: path munging on Windows --- run.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'run.lua') diff --git a/run.lua b/run.lua index 405e7e5..188269b 100644 --- a/run.lua +++ b/run.lua @@ -141,8 +141,9 @@ function run.settings() Settings.x, Settings.y, Settings.displayindex = love.window.getPosition() end local filename = Editor_state.filename - if filename:sub(1,1) ~= '/' then - filename = 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 then + filename = love.filesystem.getWorkingDirectory()..os_path_separator..filename end return { x=Settings.x, y=Settings.y, displayindex=Settings.displayindex, -- cgit 1.4.1-2-gfad0