From 8e98711096a315023dbf530fe2e1a5e56106cf51 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 4 Jan 2025 15:52:52 -0400 Subject: [PATCH] small filesystem code cleanup --- src/modules/event/sdl/Event.cpp | 1 - src/modules/filesystem/Filesystem.h | 2 -- src/modules/filesystem/physfs/Filesystem.cpp | 4 +++- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/modules/event/sdl/Event.cpp b/src/modules/event/sdl/Event.cpp index 4adb4efe8..506f3028d 100644 --- a/src/modules/event/sdl/Event.cpp +++ b/src/modules/event/sdl/Event.cpp @@ -21,7 +21,6 @@ #include "Event.h" #include "common/int.h" -#include "filesystem/NativeFile.h" #include "filesystem/Filesystem.h" #include "keyboard/sdl/Keyboard.h" #include "joystick/JoystickModule.h" diff --git a/src/modules/filesystem/Filesystem.h b/src/modules/filesystem/Filesystem.h index 3cc07655d..6c0f3e350 100644 --- a/src/modules/filesystem/Filesystem.h +++ b/src/modules/filesystem/Filesystem.h @@ -58,8 +58,6 @@ namespace love namespace filesystem { -class NativeFile; - class Filesystem : public Module { public: diff --git a/src/modules/filesystem/physfs/Filesystem.cpp b/src/modules/filesystem/physfs/Filesystem.cpp index b4155ff0b..81cc1a9cf 100644 --- a/src/modules/filesystem/physfs/Filesystem.cpp +++ b/src/modules/filesystem/physfs/Filesystem.cpp @@ -690,7 +690,9 @@ std::string Filesystem::getFullCommonPath(CommonPath path) #endif - fullPaths[path] = canonicalizeRealPath(fullPaths[path].c_str()); + if (!fullPaths[path].empty()) + fullPaths[path] = canonicalizeRealPath(fullPaths[path].c_str()); + return fullPaths[path]; }