XDG home directory support

This commit is contained in:
Tim Angus committed 2025-10-19 15:58:27 +01:00
1 parent da4f9bd13d
commit 0ebf1df742
18 files changed
+527 -143

No files matched your search

+6 -6
View File
@@ -205,7 +205,7 @@ void QDECL Com_Printf( const char *fmt, ... ) {
time( &aclock );
newtime = localtime( &aclock );
logfile = FS_FOpenFileWrite( "qconsole.log" );
logfile = FS_FOpenFileWrite_HomeData( "qconsole.log" );
if(logfile)
{
@@ -1921,8 +1921,8 @@ void Com_InitJournaling( void ) {
if ( com_journal->integer == 1 ) {
Com_Printf( "Journaling events\n");
com_journalFile = FS_FOpenFileWrite( "journal.dat" );
com_journalDataFile = FS_FOpenFileWrite( "journaldata.dat" );
com_journalFile = FS_FOpenFileWrite_HomeState( "journal.dat" );
com_journalDataFile = FS_FOpenFileWrite_HomeState( "journaldata.dat" );
} else if ( com_journal->integer == 2 ) {
Com_Printf( "Replaying journaled events\n");
FS_FOpenFileRead( "journal.dat", &com_journalFile, qtrue );
@@ -2547,7 +2547,7 @@ static void Com_WriteCDKey( const char *filename, const char *ikey ) {
#ifndef _WIN32
savedumask = umask(0077);
#endif
f = FS_BaseDir_FOpenFileWrite( fbuffer );
f = FS_BaseDir_FOpenFileWrite_HomeState( fbuffer );
if ( !f ) {
Com_Printf ("Couldn't write CD key to %s.\n", fbuffer );
goto out;
@@ -2921,7 +2921,7 @@ void Com_ReadFromPipe( void )
void Com_WriteConfigToFile( const char *filename ) {
fileHandle_t f;
f = FS_FOpenFileWrite( filename );
f = FS_FOpenFileWrite_HomeConfig( filename );
if ( !f ) {
Com_Printf ("Couldn't write %s.\n", filename );
return;
@@ -3293,7 +3293,7 @@ void Com_Shutdown (void) {
if( pipefile ) {
FS_FCloseFile( pipefile );
FS_HomeRemove( com_pipefile->string );
FS_Remove_HomeData( com_pipefile->string );
}
}