Linux gzdoom wad cache folder
Posted: Sun Aug 08, 2010 21:16
I didn't know what revision to put in the topic title because I've just noticed this bug.
When gzdoom is run under Linux, instead of using the home folder, it just creates the folder '~' in the current directory, and stores everything in there.
This is from the latest build I have, but this one has been in there for quite some time.
I've checked back a couple revisions (which I compiled of course), and the oldest revision I could find which has this behaviour is r736.
It's just the cache files, everything else, configs to savegames and screenshots are correctly placed into the user home folder.
It should be easy to fix this, I'll check if I can't create a patch myself.
It doesn't seem to save the cache files for now, but the path now looks correct.
When gzdoom is run under Linux, instead of using the home folder, it just creates the folder '~' in the current directory, and stores everything in there.
This is from the latest build I have, but this one has been in there for quite some time.
I've checked back a couple revisions (which I compiled of course), and the oldest revision I could find which has this behaviour is r736.
Code: Select all
guntherdw@lisa /GuntherDW/src/svn/gzdoom % cd build.r864/
guntherdw@lisa /GuntherDW/src/svn/gzdoom/build.r864 % find \~
~
~/.gzdoom
~/.gzdoom/cache
~/.gzdoom/cache/urban_sl.zip
~/.gzdoom/cache/urban_sl.zip/urban_sl.wad:MAP01.gzc
~/.gzdoom/cache/urban_sl.zip/urban_sl.wad:TITLEMAP.gzc
~/.gzdoom/cache/AV.WAD
~/.gzdoom/cache/AV.WAD/MAP11.gzc
~/.gzdoom/cache/viscerus.pk3
~/.gzdoom/cache/viscerus.pk3/maps%map06.wad.gzc
It should be easy to fix this, I'll check if I can't create a patch myself.
Code: Select all
Index: src/gl/data/gl_nodes.cpp
===================================================================
--- src/gl/data/gl_nodes.cpp (revision 866)
+++ src/gl/data/gl_nodes.cpp (working copy)
@@ -960,6 +960,7 @@
unsigned int startTime, endTime;
startTime = I_FPSTime ();
+
TArray<FNodeBuilder::FPolyStart> polyspots, anchors;
P_GetPolySpots (map, polyspots, anchors);
FNodeBuilder::FLevel leveldata =
@@ -1025,6 +1026,7 @@
path += "gzdoom/cache";
#else
path = HOME_DIR"/cache";
+ path = NicePath(path);
#endif
FString lumpname = Wads.GetLumpFullPath(map->lumpnum);
@@ -1034,6 +1036,7 @@
lumpname.ReplaceChars('/', '%');
path << '/' << lumpname.Right(lumpname.Len() - separator - 1) << ".gzc";
+ Printf("cache file : %s\n", path.GetChars());
return path;
}