about summary refs log tree commit diff stats
path: root/run.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-09-10 19:26:44 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-09-10 19:26:44 -0700
commit7fb71f92199000a470cbac36fa4de31db810d88a (patch)
treeb01fd39dc278445edad28e1a43779e0c81274eda /run.lua
parent81b0646ec1c3f9deae5e4b2c0b538102aa973a6e (diff)
parentb23269f3e03b69e914f8f6311e9c873508619949 (diff)
downloadview.love-7fb71f92199000a470cbac36fa4de31db810d88a.tar.gz
Merge text.love
Diffstat (limited to 'run.lua')
-rw-r--r--run.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/run.lua b/run.lua
index b86edc1..95e2efb 100644
--- a/run.lua
+++ b/run.lua
@@ -136,8 +136,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,