Changeset 1116 for trunk/dll/worker.c


Ignore:
Timestamp:
Aug 24, 2008, 8:28:25 PM (17 years ago)
Author:
Gregg Young
Message:

Modify COPY/Move checks to account for large file support. (Ticket 256)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/worker.c

    r1101 r1116  
    786786
    787787                      FSALLOCATE fsa;
    788                       ULONG clFreeBytes;
     788                      ULONGLONG ullFreeBytes;
    789789                      CHAR *ptr;
    790790                      INT cntr;
     
    795795                                          FSIL_ALLOC,
    796796                                          &fsa, sizeof(FSALLOCATE))) {
    797                         // Assume <2GB since file did not fit
    798                         clFreeBytes = fsa.cUnitAvail * fsa.cSectorUnit *
     797                        // Assume large file support
     798                        ullFreeBytes = (ULONGLONG) fsa.cUnitAvail * fsa.cSectorUnit *
    799799                          fsa.cbSector;
    800                         if (clFreeBytes) {
     800                        if (ullFreeBytes) {
    801801                          // Find item that will fit in available space
    802802                          for (cntr = x + 1; wk->li->list[cntr]; cntr++) {
     
    808808                                !(fs4.attrFile & FILE_DIRECTORY) &&
    809809                                // fixme to use CBLIST_TO_EASIZE?
    810                                 fs4.cbFile + fs4.cbList <= clFreeBytes) {
     810                                fs4.cbFile + fs4.cbList <= ullFreeBytes) {
    811811                              // Swap with failing item
    812812                              ptr = wk->li->list[x];
Note: See TracChangeset for help on using the changeset viewer.