Changeset 36 for trunk/dll/worker.c
- Timestamp:
- Oct 17, 2002, 3:53:23 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/worker.c
r2 r36 1 2 /*********************************************************************** 3 4 $Id$ 5 6 Worker thread 7 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 2002 Steven H.Levine 10 11 Revisions 16 Oct 02 SHL - Comments 12 13 ***********************************************************************/ 14 1 15 #define INCL_DOS 2 16 #define INCL_WIN … … 689 703 existed = (IsFile(newname) != -1); 690 704 isnewer = IsNewer(wk->li->list[x],newname); 691 /* 692 { 693 static char temp[CCHMAXPATH * 3]; 694 695 sprintf(temp,"Target: %s\rSource: %s\rOverold: %lu\rOvernew: %lu\rIsNewer: %lu\rExisted: %lu",newname,wk->li->list[x],overold,overnew,isnewer,existed); 696 saymsg(MB_ENTER,HWND_DESKTOP,DEBUG_STRING,temp); 697 } 698 */ 705 /* 706 { 707 char temp[CCHMAXPATH * 3]; 708 sprintf(temp,"Target: %s\rSource: %s\rOverold: %lu\rOvernew: %lu\rIsNewer: %lu\rExisted: %lu",newname,wk->li->list[x],overold,overnew,isnewer,existed); 709 saymsg(MB_ENTER,HWND_DESKTOP,DEBUG_STRING,temp); 710 } 711 */ 699 712 if(existed && 700 713 wk->li->type != IDM_RENAME && … … 810 823 811 824 FSALLOCATE fsa; 812 ULONG totalsize;825 ULONG clFreeBytes; 813 826 CHAR *ptr; 814 827 INT cntr; … … 820 833 &fsa, 821 834 sizeof(FSALLOCATE))) { 822 totalsize = fsa.cUnitAvail * fsa.cSectorUnit * 835 // Assume <2GB since file did not fit 836 clFreeBytes = fsa.cUnitAvail * fsa.cSectorUnit * 823 837 fsa.cbSector; 824 if(totalsize) { 838 if(clFreeBytes) { 839 // Find item that will fit in available space 825 840 for(cntr = x + 1;wk->li->list[cntr];cntr++) { 826 841 DosError(FERR_DISABLEHARDERR); … … 830 845 sizeof(fs4)) && 831 846 !(fs4.attrFile & FILE_DIRECTORY) && 832 fs4.cbFile + fs4.cbList <= totalsize) { 847 fs4.cbFile + fs4.cbList <= clFreeBytes) { 848 // Swap with failing item 833 849 ptr = wk->li->list[x]; 834 850 wk->li->list[x] = wk->li->list[cntr];
Note:
See TracChangeset
for help on using the changeset viewer.