Browse Source

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.
Miku AuahDark 7 months ago
parent
commit
be21958ab3
1 changed files with 1 additions and 6 deletions
  1. 1 6
      src/modules/window/sdl/Window.cpp

+ 1 - 6
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
 	{