From be21958ab3577b5d17b3912e8173fd453f8e851a Mon Sep 17 00:00:00 2001 From: Miku AuahDark Date: Thu, 16 Jan 2025 16:54:23 +0800 Subject: [PATCH] Don't canonicalize paths fom SDL file dialog callbacks. If love.filesystem.openNativeFile can't open them, then it's SDL issue, not LOVE. This is also needed because Android returns content:// URIs instead of regular paths. --- src/modules/window/sdl/Window.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/modules/window/sdl/Window.cpp b/src/modules/window/sdl/Window.cpp index b1cbe1df7..50d09680b 100644 --- a/src/modules/window/sdl/Window.cpp +++ b/src/modules/window/sdl/Window.cpp @@ -1525,12 +1525,7 @@ static void SDLCALL fileDialogCallbackSDL(void *userdata, const char *const *fil { // SDL's file list only lasts until the end of the callback, so we copy it. for (int i = 0; filelist[i] != nullptr; i++) - { - std::string file(filelist[i]); - if (fs != nullptr) - file = fs->canonicalizeRealPath(file); - state->files.push_back(file); - } + state->files.push_back(filelist[i]); } else {