Changeset 1750 for trunk/dll/avl.c
- Timestamp:
- Mar 1, 2014, 2:55:57 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/avl.c
r1625 r1750 43 43 26 Aug 11 GKY Add the code to correctly format the date time strings for tar.gz archives 44 44 viewed using tar 1.15+ 45 01 Mar 14 JBS Ticket #524: Made "searchapath" thread-safe. Function names and signatures were changed. 46 So calls to these functions had to be changed. 45 47 46 48 ***********************************************************************/ … … 76 78 #include "wrappers.h" // xfgets 77 79 #include "strips.h" // bstrip 78 #include "srchpath.h" // searchpath80 #include "srchpath.h" // Search*Path*ForFile 79 81 #include "stristr.h" // stristr 80 82 #include "delims.h" // to_delim … … 376 378 arcsigs_trailer_line_num = 0; 377 379 378 //DosEnterCritSec(); //GKY 11-29-08 379 DosRequestMutexSem(hmtxFM2Globals, SEM_INDEFINITE_WAIT); 380 psz = searchpath(PCSZ_ARCHIVERBB2); 381 if (!psz || !*psz) { 380 { 381 CHAR szFullFilename[CCHMAXPATH]; 382 383 DosRequestMutexSem(hmtxFM2Globals, SEM_INDEFINITE_WAIT); 384 if (SearchMultiplePathsForFile(PCSZ_ARCHIVERBB2, szFullFilename)) { 385 DosReleaseMutexSem(hmtxFM2Globals); 386 return -1; 387 } 388 stat(szFullFilename, &Archiverbb2Stats); 389 fp = xfsopen(szFullFilename, moder, SH_DENYWR, pszSrcFile, __LINE__, TRUE); 382 390 DosReleaseMutexSem(hmtxFM2Globals); 383 //DosExitCritSec(); 384 return -1; 391 if (!fp) 392 return -2; 393 strcpy(archiverbb2, szFullFilename); // Remember full path 385 394 } 386 stat(psz, &Archiverbb2Stats);387 fp = xfsopen(psz, moder, SH_DENYWR, pszSrcFile, __LINE__, TRUE);388 DosReleaseMutexSem(hmtxFM2Globals);389 //DosExitCritSec();390 if (!fp)391 return -2;392 strcpy(archiverbb2, psz); // Remember full path393 395 394 396 cur_line_num = 0; … … 790 792 struct stat Buffer; 791 793 792 stat(searchpath(PCSZ_ARCHIVERBB2), &Buffer); 794 // stat(searchpath(PCSZ_ARCHIVERBB2), &Buffer); 795 stat(archiverbb2, &Buffer); // jbs: Re-use full name set by load_achivers 793 796 if (Archiverbb2Stats.st_size != Buffer.st_size || 794 Archiverbb2Stats.st_mtime != Buffer.st_mtime) 795 if (saymsg(MB_YESNO, 797 Archiverbb2Stats.st_mtime != Buffer.st_mtime) 798 if (saymsg(MB_YESNO, 796 799 hwnd, 797 800 GetPString(IDS_ADCHANGESONDISKTEXT), … … 887 890 GetPString(IDS_ADCHANGESINMEMTEXT), 888 891 GetPString(IDS_ADREWRITETEXT), NullStr) == MBID_YES) { 889 PSZ ab2 = searchpath(PCSZ_ARCHIVERBB2); // Rewrite without prompting890 891 rewrite_archiverbb2(a b2);892 // 524 PSZ ab2 = searchpath(PCSZ_ARCHIVERBB2); // Rewrite without prompting 893 894 rewrite_archiverbb2(archiverbb2); // jbs: Re-use full path set by load_archivers 892 895 } 893 896 }
Note:
See TracChangeset
for help on using the changeset viewer.