Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:RedDwarf:remakes
PhantomasPC
PhantomasPC-0.9-logfile.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File PhantomasPC-0.9-logfile.patch of Package PhantomasPC
--- src/log.c +++ src/log.c @@ -5,6 +5,7 @@ License: Giftware. */ +#define _GNU_SOURCE #include <stdio.h> #include <stdlib.h> #include <stdarg.h> @@ -23,13 +24,16 @@ static char disable_log=0; unsigned long int size=0L; time_t ti; +static char* logfile; if (init) { - file=fopen(LOGFILE,"at+"); + asprintf(&logfile,"%s/.phantpc/%s",getenv("HOME"),LOGFILE); + file=fopen(logfile,"at+"); if (file==NULL) { disable_log=1; + free(logfile); } else { @@ -39,7 +43,7 @@ if (size>=10000) { fclose(file); - delete_file(LOGFILE); + delete_file(logfile); } } } @@ -47,7 +51,7 @@ if (!disable_log) { va_start(args,format); - file=fopen(LOGFILE,"at+"); + file=fopen(logfile,"at+"); if (init) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor