IOQ3 commit 2253

This commit is contained in:
Richard Allen 2012-10-04 14:27:56 +00:00
parent 31a7c4c941
commit f8215ff6af
5 changed files with 1 additions and 59 deletions

View file

@ -1120,7 +1120,6 @@ char *Sys_DefaultAppPath(void);
void Sys_SetDefaultHomePath(const char *path); void Sys_SetDefaultHomePath(const char *path);
char *Sys_DefaultHomePath(void); char *Sys_DefaultHomePath(void);
const char *Sys_TempPath(void);
const char *Sys_Dirname( char *path ); const char *Sys_Dirname( char *path );
const char *Sys_Basename( char *path ); const char *Sys_Basename( char *path );
char *Sys_ConsoleInput(void); char *Sys_ConsoleInput(void);

View file

@ -140,7 +140,7 @@ Sys_PIDFileName
*/ */
static char *Sys_PIDFileName( void ) static char *Sys_PIDFileName( void )
{ {
return va( "%s/%s", Sys_TempPath( ), PID_FILENAME ); return va( "%s/%s", Sys_DefaultHomePath( ), PID_FILENAME );
} }
/* /*

View file

@ -34,28 +34,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#import <Carbon/Carbon.h> #import <Carbon/Carbon.h>
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
/*
================
Sys_TempPath
================
*/
const char *Sys_TempPath( void )
{
static UInt8 posixPath[ MAX_OSPATH ];
FSRef ref;
if( FSFindFolder( kOnAppropriateDisk,
kTemporaryFolderType, kCreateFolder, &ref ) == noErr )
{
if( FSRefMakePath( &ref, posixPath,
sizeof( posixPath ) - 1 ) == noErr )
{
return (const char *)posixPath;
}
}
return "/tmp";
}
/* /*
============== ==============
Sys_Dialog Sys_Dialog

View file

@ -78,23 +78,6 @@ char *Sys_DefaultHomePath(void)
return homePath; return homePath;
} }
#ifndef MACOS_X
/*
================
Sys_TempPath
================
*/
const char *Sys_TempPath( void )
{
const char *TMPDIR = getenv( "TMPDIR" );
if( TMPDIR == NULL || TMPDIR[ 0 ] == '\0' )
return "/tmp";
else
return TMPDIR;
}
#endif
/* /*
================ ================
Sys_Milliseconds Sys_Milliseconds

View file

@ -127,24 +127,6 @@ char *Sys_DefaultHomePath( void )
return homePath; return homePath;
} }
/*
================
Sys_TempPath
================
*/
const char *Sys_TempPath( void )
{
static TCHAR path[ MAX_PATH ];
DWORD length;
length = GetTempPath( sizeof( path ), path );
if( length > sizeof( path ) || length == 0 )
return Sys_DefaultHomePath( );
else
return path;
}
/* /*
================ ================
Sys_Milliseconds Sys_Milliseconds