Changeset 1082 for trunk/dll/arccnrs.c
- Timestamp:
- Jul 20, 2008, 12:37:36 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/arccnrs.c
r1078 r1082 55 55 14 Jul 08 JBS Ticket 126: Add support for WPS open default & open settings in arccnrs 56 56 16 Jul 08 GKY Fix trap on viewing multiple files from an archive (misplaced free) 57 16 J UL 08 GKY Use TMP directory for temp files if present.57 16 Jul 08 GKY Use TMP directory for temp files if present. Use MakeTempName 58 58 59 59 ***********************************************************************/ … … 424 424 HFILE newstdout; 425 425 CHAR s[CCHMAXPATH * 2], lonename[CCHMAXPATH + 2], 426 *nsize, *osize, *fdate, *fname, *p, *pp, arctemp[CCHMAXPATH];426 *nsize, *osize, *fdate, *fname, *p, *pp, *arctemp; 427 427 BOOL gotstart; 428 428 BOOL gotend; … … 442 442 if (!info) 443 443 info = find_type(arcname, NULL); 444 for (x = 0; x < 99; x++) { 444 arctemp = xmallocz(CCHMAXPATH, pszSrcFile, __LINE__); 445 MakeTempName(arctemp, ArcTempRoot, 2); 446 /*for (x = 0; x < 99; x++) { 445 447 sprintf(arctemp, "%s.%03x", ArcTempRoot, (clock() & 4095L)); 446 448 if (IsFile(arctemp) == 1) … … 448 450 else 449 451 break; 450 } 452 } */ 453 454 //printf("%s\r", arctemp); fflush(stdout); 451 455 452 456 ReTry: … … 508 512 else { 509 513 fp = xfopen(arctemp, "w", pszSrcFile, __LINE__); 510 if (!fp) 511 return 0; 514 if (!fp) { 515 xfree(arctemp, pszSrcFile, __LINE__); 516 return 0; 517 } 512 518 else { 513 519 newstdout = -1; … … 516 522 if (rc) { 517 523 Dos_Error(MB_CANCEL, rc, hwndCnr, pszSrcFile, __LINE__, 518 "DosDupHandle"); 524 "DosDupHandle"); 525 xfree(arctemp, pszSrcFile, __LINE__); 519 526 return 0; 520 527 } … … 526 533 Dos_Error(MB_CANCEL, rc, hwndCnr, pszSrcFile, __LINE__, 527 534 "DosDupHandle"); 528 return 0; 535 xfree(arctemp, pszSrcFile, __LINE__); 536 return 0; 529 537 } 530 538 else { … … 786 794 DosError(FERR_DISABLEHARDERR); 787 795 DosForceDelete(arctemp); 796 xfree(arctemp, pszSrcFile, __LINE__); 788 797 } 789 798 … … 1484 1493 free(s); 1485 1494 if (IsFile(filename) == 1) { 1486 #if 0// 06 Oct 07 SHL fixme to be gone - set to 0 for ticket #58 testing1495 #if 1 // 06 Oct 07 SHL fixme to be gone - set to 0 for ticket #58 testing 1487 1496 if (fViewChild && fArcStuffVisible) 1488 1497 DosSleep(100); // Allow unzip session to finish closing 14 Mar 07 SHL … … 1769 1778 if (p) { 1770 1779 BldFullPathName(p, li->targetpath, temp); 1771 /*strcpy(p, li->targetpath);1772 if (p[strlen(p) - 1] != '\\')1773 strcat(p, "\\");1774 strcat(p, temp);*/1775 1780 li->list[x] = p; 1776 1781 free(temp); … … 3535 3540 dcd->id = id; 3536 3541 dcd->type = ARC_FRAME; 3537 if (!pTmpDir) { 3538 save_dir2(dcd->workdir); 3539 if (dcd->workdir[strlen(dcd->workdir) - 1] != '\\') 3542 if (!pTmpDir) 3543 save_dir2(dcd->workdir); 3544 MakeTempName(dcd->workdir, ArcTempRoot, 2); 3545 /*if (dcd->workdir[strlen(dcd->workdir) - 1] != '\\') 3540 3546 strcat(dcd->workdir, "\\"); 3541 3547 sprintf(dcd->workdir + strlen(dcd->workdir), "%s.%03x", 3542 3548 ArcTempRoot, (clock() & 4095)); 3543 }3544 3549 else 3545 3550 sprintf(dcd->workdir, "%s.%03x", 3546 ArcTempRoot, (clock() & 4095)); 3551 ArcTempRoot, (clock() & 4095));*/ 3547 3552 strcpy(dcd->arcname, fullname); 3548 3553 if (*extractpath) {
Note:
See TracChangeset
for help on using the changeset viewer.