Changeset 417
- Timestamp:
- Wed Feb 6 14:10:04 2008
- Files:
-
- branches/startup_crash/source/common/launch.c (modified) (diff)
- branches/startup_crash/support/loader/inprocsrvr_6rw.dll (modified)
- branches/startup_crash/support/loader/run_6dc.exe (modified)
- branches/startup_crash/support/loader/inprocsrvr_7rw.dll (modified)
- branches/startup_crash/support/loader/run_7dc.exe (modified)
- branches/startup_crash/support/loader/run_6rw.exe (modified)
- branches/startup_crash/support/loader/run_7rw.exe (modified)
- branches/startup_crash/support/loader/inprocsrvr_6rc.dll (modified)
- branches/startup_crash/support/loader/inprocsrvr_7rc.dll (modified)
- branches/startup_crash/support/loader/run_6rc.exe (modified)
- branches/startup_crash/support/loader/run_7rc.exe (modified)
- branches/startup_crash/support/loader/inprocsrvr_6dw.dll (modified)
- branches/startup_crash/support/loader/inprocsrvr_7dw.dll (modified)
- branches/startup_crash/support/loader/run_6dw.exe (modified)
- branches/startup_crash/support/loader/run_7dw.exe (modified)
- branches/startup_crash/support/loader/inprocsrvr_6dc.dll (modified)
- branches/startup_crash/support/loader/inprocsrvr_7dc.dll (modified)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
branches/startup_crash/source/common/launch.c
r415 r417 171 171 #endif /* _CONSOLE */ 172 172 173 174 173 int testTempPath(char *buff) 175 174 { … … 194 193 } 195 194 196 voidgetTempPath(char *buff)195 int getTempPath(char *buff) 196 195 { 197 196 #ifdef WIN32 198 197 GetTempPath(MAX_PATH, buff); 199 testTempPath(buff); 198 if (testTempPath(buff)) 199 return 1; 200 200 #else 201 201 static const char *envname[] = { … … 213 213 strcpy(buff, p); 214 214 if (testTempPath(buff)) 215 return; 215 return 1; 215 215 } 216 216 } … … 219 219 strcpy(buff, dirname[i]); 220 220 if (testTempPath(buff)) 221 return; 221 return 1; 221 221 } 222 buff[0] = '\0';223 222 #endif 223 buff[0] = '\0'; 224 return 0; 224 225 } 225 226 /* … … 804 805 strcpy(fnm, path); 805 806 strcat(fnm, name); 806 if (stat(fnm, &sbuf) == -1) { 807 VS("%s\n", fnm); 808 return fopen(fnm, "wb"); 809 } 810 return NULL; 807 if (stat(fnm, &sbuf) == 0) { 808 OTHERERROR("WARNING: file already exists but should not: %s\n", fnm); 809 } 810 return fopen(fnm, "wb"); 811 811 } 812 812 /* … … 824 824 825 825 if (!f_workpath) { 826 getTempPath(f_temppath); 826 if (!getTempPath(f_temppath)) 827 { 828 FATALERROR("INTERNAL ERROR: cannot create temporary directory!\n"); 829 return -1; 830 } 827 831 #ifdef WIN32 828 832 strcpy(f_temppathraw, f_temppath); … … 833 837 f_workpath = f_temppath; 834 838 } 839 835 840 out = openTarget(f_workpath, ptoc->name); 836 841 837 842 if (out == NULL) { 838 843 FATALERROR("%s could not be extracted!\n", ptoc->name); 844 return -1; 839 845 } 840 846 else {
