about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-09-19 00:08:52 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-09-19 00:08:52 -0700
commitaae35c7e046fe995f04f7b4938730dea83a29a5d (patch)
tree67af631c01c0d81712cd544655c4e7ba110e1396
parent6d1dee38f0557fe25e57f6a3229476cff33b0140 (diff)
downloadtext.love-aae35c7e046fe995f04f7b4938730dea83a29a5d.tar.gz
source: support only relative paths within the app
-rw-r--r--source.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/source.lua b/source.lua
index 0475569..e0f3918 100644
--- a/source.lua
+++ b/source.lua
@@ -260,16 +260,13 @@ function source.settings()
 --?     print('reading source window position')
     Settings.source.x, Settings.source.y, Settings.source.displayindex = App.screen.position()
   end
-  local filename = Editor_state.filename
-  if is_relative_path(filename) then
-    filename = love.filesystem.getWorkingDirectory()..'/'..filename  -- '/' should work even on Windows
-  end
 --?   print('saving source settings', Settings.source.x, Settings.source.y, Settings.source.displayindex)
+  print(Editor_state.filename)
   return {
     x=Settings.source.x, y=Settings.source.y, displayindex=Settings.source.displayindex,
     width=App.screen.width, height=App.screen.height,
     font_height=Editor_state.font_height,
-    filename=filename,
+    filename=Editor_state.filename,
     screen_top=Editor_state.screen_top1, cursor=Editor_state.cursor1,
     show_log_browser_side=Show_log_browser_side,
     focus=Focus,