slade/basepk3.diff

31 lines
1.1 KiB
Diff
Raw Normal View History

From: Jan Engelhardt <jengelh@inai.de>
Search for the resource file in /usr/share/slade, and prefer ~/.slade
over anything else.
(DIR_RES is /usr/share/appinfo according to wxWidgets,
which is not used in Linux distros.)
---
src/Archive/ArchiveManager.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Index: SLADE-3.2.6/src/Archive/ArchiveManager.cpp
===================================================================
--- SLADE-3.2.6.orig/src/Archive/ArchiveManager.cpp
+++ SLADE-3.2.6/src/Archive/ArchiveManager.cpp
@@ -132,14 +132,12 @@ bool ArchiveManager::init()
}
// Find slade3.pk3 directory
- auto dir_slade_pk3 = app::path("slade.pk3", app::Dir::Resources);
+ auto dir_slade_pk3 = app::path("slade.pk3", app::Dir::User);
if (!fileutil::fileExists(dir_slade_pk3))
dir_slade_pk3 = app::path("slade.pk3", app::Dir::Data);
if (!fileutil::fileExists(dir_slade_pk3))
dir_slade_pk3 = app::path("slade.pk3", app::Dir::Executable);
if (!fileutil::fileExists(dir_slade_pk3))
- dir_slade_pk3 = app::path("slade.pk3", app::Dir::User);
- if (!fileutil::fileExists(dir_slade_pk3))
dir_slade_pk3 = "slade.pk3";
// Open slade.pk3