about summary refs log tree commit diff stats
path: root/run.lua
diff options
context:
space:
mode:
Diffstat (limited to 'run.lua')
-rw-r--r--run.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/run.lua b/run.lua
index 16857f9..e395978 100644
--- a/run.lua
+++ b/run.lua
@@ -136,9 +136,8 @@ function run.settings()
     Settings.x, Settings.y, Settings.displayindex = love.window.getPosition()
   end
   local filename = Editor_state.filename
-  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
+  if is_relative_path(filename) then
+    filename = love.filesystem.getWorkingDirectory()..'/'..filename  -- '/' should work even on Windows
   end
   return {
     x=Settings.x, y=Settings.y, displayindex=Settings.displayindex,