start flowing code changes to the source dir again
No need to protect against nativefs errors here, because we're not going to be running driver.love on iOS.
This commit is contained in:
parent
2871034da6
commit
ba0864f308
7
live.lua
7
live.lua
|
@ -163,7 +163,7 @@ function live.run(buf)
|
|||
live.eval(definition_name..' = nil', 'driver') -- ignore errors which will likely be from keywords like `function = nil`
|
||||
-- try to remove the file from both source_dir and save_dir
|
||||
-- this won't work for files inside .love files
|
||||
App.remove(App.source_dir..Live.filename[definition_name])
|
||||
nativefs.remove(App.source_dir..Live.filename[definition_name])
|
||||
love.filesystem.remove(Live.filename[definition_name])
|
||||
Live.filename[definition_name] = nil
|
||||
end
|
||||
|
@ -221,10 +221,9 @@ function live.run(buf)
|
|||
Live.filename[definition_name] = filename
|
||||
end
|
||||
-- try to write to source dir
|
||||
local status, err = App.write_file(App.source_dir..filename, buf)
|
||||
local status, err = nativefs.write(App.source_dir..filename, buf)
|
||||
if err then
|
||||
-- not possible; perhaps it's a .love file
|
||||
-- try to write to save dir
|
||||
-- fall back on save dir
|
||||
local status, err2 = love.filesystem.write(filename, buf)
|
||||
if err2 then
|
||||
-- throw an error
|
||||
|
|
Loading…
Reference in New Issue