From 5ea87b8599f4486578bd012b300a6b13d5cf4856 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 23 Mar 2024 09:01:41 -0700 Subject: [PATCH] stop using nativefs for file location MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- 0177-has_local_modifications | 2 +- 0195-can_be_unstashed | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/0177-has_local_modifications b/0177-has_local_modifications index 266a695..87348dd 100644 --- a/0177-has_local_modifications +++ b/0177-has_local_modifications @@ -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 \ No newline at end of file diff --git a/0195-can_be_unstashed b/0195-can_be_unstashed index f86538e..bed64d1 100644 --- a/0195-can_be_unstashed +++ b/0195-can_be_unstashed @@ -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 \ No newline at end of file