Changeset 3668


Ignore:
Timestamp:
Oct 31, 2007, 7:31:12 PM (14 years ago)
Author:
livings124
Message:

0.9x: Leopard: Time Machine will ignore incomplete files

Location:
branches/0.9x
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/0.9x/NEWS

    r3641 r3668  
    330.92 (2007/xx/yy)
    44- OS X:
     5   + Leopard: Time Machine will ignore incomplete files
    56   + Leopard: Fix bug with typing values in Inspector->Options
    67   + Leopard: Fix bug with toggling Minimal View
  • branches/0.9x/macosx/Torrent.m

    r3504 r3668  
    14511451   
    14521452    [self update];
     1453   
     1454    //mark incomplete files to be ignored by Time Machine
     1455    if ([NSApp isOnLeopardOrBetter])
     1456    {
     1457        NSURL *url = [NSURL fileURLWithPath: [[self downloadFolder] stringByAppendingPathComponent: [self name]]];
     1458        CSBackupSetItemExcluded((CFURLRef)url, ![self allDownloaded], false);
     1459    }
     1460   
    14531461    return self;
    14541462}
     
    15851593            fDateCompleted = [[NSDate alloc] init];
    15861594           
     1595            //allow to be backed up by Time Machine
     1596            if ([NSApp isOnLeopardOrBetter])
     1597            {
     1598                NSURL *url = [NSURL fileURLWithPath: [[self downloadFolder] stringByAppendingPathComponent: [self name]]];
     1599                CSBackupSetItemExcluded((CFURLRef)url, false, false);
     1600            }
     1601           
    15871602            fStat = tr_torrentStat(fHandle);
    15881603            [[NSNotificationCenter defaultCenter] postNotificationName: @"TorrentFinishedDownloading" object: self];
     
    15901605       
    15911606        case TR_CP_INCOMPLETE:
     1607            //do not allow to be backed up by Time Machine
     1608            if ([NSApp isOnLeopardOrBetter])
     1609            {
     1610                NSURL *url = [NSURL fileURLWithPath: [[self downloadFolder] stringByAppendingPathComponent: [self name]]];
     1611                CSBackupSetItemExcluded((CFURLRef)url, true, false);
     1612            }
     1613           
    15921614            [[NSNotificationCenter defaultCenter] postNotificationName: @"TorrentRestartedDownloading" object: self];
    15931615            break;
Note: See TracChangeset for help on using the changeset viewer.