Linux gzdoom wad cache folder

Bugs that have been resolved.

Moderator: Graf Zahl

Locked
User avatar
GuntherDW
Posts: 117
Joined: Sat Nov 12, 2005 1:53
Location: Belgium, Antwerp
Contact:

Linux gzdoom wad cache folder

Post by GuntherDW »

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.

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'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.

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;
 }
 
It doesn't seem to save the cache files for now, but the path now looks correct.
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: Linux gzdoom wad cache folder

Post by Gez »

GuntherDW wrote:It doesn't seem to save the cache files for now, but the path now looks correct.
Uh, what do you mean by that? If it cannot save the cache files with your patch, then there's a bug in it.
User avatar
GuntherDW
Posts: 117
Joined: Sat Nov 12, 2005 1:53
Location: Belgium, Antwerp
Contact:

Re: Linux gzdoom wad cache folder

Post by GuntherDW »

I've also put some printf's in the create and check folder.
It passes the checkcachednodes function, but doesn't seem to pass CreateCachedNodes.

Or at least not far enough for the Printf?

And by "correct" I mean that it tells me the path is correct (/home/guntherdw/.gzdoom/cache/...... in my case).
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: Linux gzdoom wad cache folder

Post by Gez »

Well, I've nicepathed CreateCacheName. Not sure what more I can do.
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: Linux gzdoom wad cache folder

Post by Gez »

No additional feedback so I'm chalking that one as being solved.
User avatar
GuntherDW
Posts: 117
Joined: Sat Nov 12, 2005 1:53
Location: Belgium, Antwerp
Contact:

Re: Linux gzdoom wad cache folder

Post by GuntherDW »

Yup, it's saving it in the correct folder now.
Locked

Return to “Closed Bugs”