mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
36 lines
1,011 B
Diff
36 lines
1,011 B
Diff
diff -r 9582fcee983b -r c1502459a920 src/engine/e_engine.c
|
|
--- a/src/engine/e_engine.c Sun Feb 01 20:50:22 2009 +0100
|
|
+++ b/src/engine/e_engine.c Sun Feb 01 21:37:17 2009 +0100
|
|
@@ -539,14 +539,15 @@
|
|
}
|
|
|
|
/* 2) use data-dir in PWD if present */
|
|
- if(fs_is_dir("data"))
|
|
+ /* test subdir "/mapres" to reject unrelated "data" dir in PWD */
|
|
+ if(fs_is_dir("data/mapres"))
|
|
{
|
|
strcpy(datadir, "data");
|
|
return 0;
|
|
}
|
|
|
|
/* 3) use compiled-in data-dir if present */
|
|
- if (fs_is_dir(DATA_DIR))
|
|
+ if (fs_is_dir(DATA_DIR "/mapres"))
|
|
{
|
|
strcpy(datadir, DATA_DIR);
|
|
return 0;
|
|
@@ -572,9 +573,11 @@
|
|
/* 5) check for all default locations */
|
|
{
|
|
const char *sdirs[] = {
|
|
- "/usr/share/teeworlds",
|
|
- "/usr/local/share/teeworlds"
|
|
- "/opt/teeworlds"
|
|
+ "/usr/share/teeworlds/data",
|
|
+ "/usr/share/games/teeworlds/data",
|
|
+ "/usr/local/share/teeworlds/data",
|
|
+ "/usr/local/share/games/teeworlds/data",
|
|
+ "/opt/teeworlds/data"
|
|
};
|
|
const int sdirs_count = sizeof(sdirs) / sizeof(sdirs[0]);
|
|
|