equal
deleted
inserted
replaced
179 if(!resfile) { |
179 if(!resfile) { |
180 Clear(); |
180 Clear(); |
181 modified=global=false; |
181 modified=global=false; |
182 free(resfile); resfile=0; |
182 free(resfile); resfile=0; |
183 delete resobj; resobj=new cFileObj(file); |
183 delete resobj; resobj=new cFileObj(file); |
184 char *s; |
184 char *s=aprintf(file->Subdir() ? "%s/%s":"%s",file->Source()->BaseDir(),file->Subdir()); |
185 asprintf(&s,file->Subdir() ? "%s/%s":"%s",file->Source()->BaseDir(),file->Subdir()); |
|
186 if(MPlayerSetup.ResumeMode==1 || |
185 if(MPlayerSetup.ResumeMode==1 || |
187 (access(s,W_OK) && (errno==EACCES || errno==EROFS))) { |
186 (access(s,W_OK) && (errno==EACCES || errno==EROFS))) { |
188 global=true; |
187 global=true; |
189 resfile=AddPath(globalResumeDir?globalResumeDir:VideoDirectory,GLOBAL_RESUME_FILE); |
188 resfile=AddPath(globalResumeDir?globalResumeDir:VideoDirectory,GLOBAL_RESUME_FILE); |
190 d(printf("resume: using global file\n")) |
189 d(printf("resume: using global file\n")) |
579 { |
578 { |
580 if(slave) { |
579 if(slave) { |
581 va_list ap; |
580 va_list ap; |
582 va_start(ap,format); |
581 va_start(ap,format); |
583 char *buff=0; |
582 char *buff=0; |
584 vasprintf(&buff,format,ap); |
583 if(vasprintf(&buff,format,ap)<0); |
585 Lock(); |
584 Lock(); |
586 // check for writeable pipe i.e. prevent broken pipe signal |
585 // check for writeable pipe i.e. prevent broken pipe signal |
587 if(!brokenPipe) { |
586 if(!brokenPipe) { |
588 struct pollfd pfd; |
587 struct pollfd pfd; |
589 pfd.fd=inpipe[1]; pfd.events=POLLOUT; pfd.revents=0; |
588 pfd.fd=inpipe[1]; pfd.events=POLLOUT; pfd.revents=0; |