stop using nativefs for file location

nativefs doesn't work on iOS since LÖVE v11.5, so I should stop using it
at least on forks for mobile devices.

I still use it in a couple of cases:
* on a file DELETE request from the driver
* when trying to write modifications from the driver to the original
  location
This commit is contained in:
Kartik K. Agaram 2024-03-23 09:01:41 -07:00
parent 29b8fc4142
commit 5ea87b8599
2 changed files with 2 additions and 2 deletions

View File

@ -1,3 +1,3 @@
has_local_modifications = function(filename)
return nativefs.getInfo(App.save_dir..Directory..filename)
return love.filesystem.getRealDirectory(Directory..filename) == love.filesystem.getSaveDirectory()
end

View File

@ -2,5 +2,5 @@ can_be_unstashed = function(pane)
if not pane.is_stash then return end
assert(pane.filename)
local filename = unstash_filename(pane.filename)
return not nativefs.getInfo(App.save_dir..Directory..filename)
return not has_local_modifications(filename)
end