bugfix: path munging on Windows

[?]
Sep 11, 2022, 2:23 AM
ZJOSQFN6CH475MQZ5EXWSWILKNC77RVFEN44KQ2Y4EQJ2BC5YFCAC

Dependencies

  • [2] KKMFQDR4 editing source code from within the app
  • [3] X3CQLBTR set window title within each app
  • [4] OI4FPFIN support drawings in the source editor
  • [5] 2L5MEZV3 experiment: new edit namespace
  • [6] TGZAJUEF bring back a set of constants
  • [7] CQYKYJJU remember window positions across restart/ctrl+e
  • [8] LF7BWEG4 group all editor globals

Change contents

  • replacement in source_edit.lua at line 103
    [2.155031][2.155031:155096]()
    filename = love.filesystem.getUserDirectory()..'/lines.txt',
    [2.155031]
    [2.155096]
    filename = love.filesystem.getUserDirectory()..'/lines.txt', -- '/' should work even on Windows
  • replacement in source.lua at line 260
    [2.173955][2.173955:174094]()
    if filename:sub(1,1) ~= '/' then
    filename = love.filesystem.getWorkingDirectory()..'/'..filename -- '/' should work even on Windows
    [2.173955]
    [2.174094]
    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
  • replacement in run.lua at line 144
    [2.182611][2.182611:182750]()
    if filename:sub(1,1) ~= '/' then
    filename = love.filesystem.getWorkingDirectory()..'/'..filename -- '/' should work even on Windows
    [2.182611]
    [2.182750]
    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
  • replacement in edit.lua at line 97
    [3.3616][3.97595:97660]()
    filename = love.filesystem.getUserDirectory()..'/lines.txt',
    [3.3539]
    [3.97660]
    filename = love.filesystem.getUserDirectory()..'/lines.txt', -- '/' should work even on Windows