Search
j0ke.net Open Build Service
>
Projects
>
multimedia
>
MPlayer
> MPlayer-0.90pre9-tempfile-unrarlib.diff
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File MPlayer-0.90pre9-tempfile-unrarlib.diff of Package MPlayer (Revision 19)
Currently displaying revision
19
,
show latest
--- MPlayer-1.0rc1/unrarlib.c +++ MPlayer-1.0rc1/unrarlib.c @@ -2686,9 +2686,18 @@ FILE *fp; char date[] = __DATE__; char time[] = __TIME__; + char *homedir; debug_start_time = GetTickCount(); /* get start time */ - strcpy(log_file_name, file_name); /* save file name */ +/* strcpy(log_file_name, file_name); */ /* save file name */ + homedir=getenv("HOME"); + if(homedir) + { + snprintf(log_file_name, sizeof(log_file_name)-1, file_name, homedir ); + } else { + sprintf(log_file_name, file_name, "."); + } + log_file_name[sizeof(log_file_name)-1]='\0'; if((fp = fopen(log_file_name, CREATETEXT)) != NULL) { --- MPlayer-1.0rc1/unrarlib.h +++ MPlayer-1.0rc1/unrarlib.h @@ -76,7 +76,8 @@ #define _DEBUG_LOG_FILE "C:\\temp\\debug_unrar.txt" /* log file path */ #else #define _UNIX /* Linux or Unix with GCC */ -#define _DEBUG_LOG_FILE "/tmp/debug_unrar.txt" /* log file path */ + /* CAUTION: Do not remove this format string here. It's needed. */ +#define _DEBUG_LOG_FILE "%s/debug_unrar.txt" /* log file path */ /*#define NON_INTEL_BYTE_ORDER*/ /* GCC on motorola systems */ #endif