bugfix: save modified files in save directory

[?]
Sep 5, 2022, 7:39 PM
HKV72RZVJEOF5GCHCRKEBGC3FQN7AYETY7LKEJUXVIQAB4QPEPYQC

Dependencies

  • [2] PX7DDEMO autosave slightly less aggressively
  • [3] AD34IX2Z couple more tests
  • [4] JFFUF5AL override mouse state lookups in tests
  • [5] JF5L2BBS test harness now supports copy/paste
  • [6] 7CLGG7J2 test: autosave after any shape
  • [7] AVTNUQYR basic test-enabled framework
  • [8] ZLJGZYQG select text with shift + mouseclick
  • [*] 3QNOKBFM beginnings of a test harness

Change contents

  • replacement in app.lua at line 386
    [3.8162][3.1614:1692](),[3.1692][3.2713:2791](),[3.8162][3.2713:2791]()
    App.open_for_reading = function(filename) return io.open(filename, 'r') end
    App.open_for_writing = function(filename) return io.open(filename, 'w') end
    [3.8162]
    [2.1742]
    if Current_app == nil or Current_app == 'run' then
    App.open_for_reading = function(filename) return io.open(filename, 'r') end
    App.open_for_writing = function(filename) return io.open(filename, 'w') end
    elseif Current_app == 'source' then
    -- HACK: source editor requires a couple of different foundational definitions
    App.open_for_reading =
    function(filename)
    local result = love.filesystem.newFile(filename)
    local ok, err = result:open('r')
    if ok then
    return result
    else
    return ok, err
    end
    end
    App.open_for_writing =
    function(filename)
    local result = love.filesystem.newFile(filename)
    local ok, err = result:open('w')
    if ok then
    return result
    else
    return ok, err
    end
    end
    end