Changeset 3667


Ignore:
Timestamp:
Oct 31, 2007, 7:28:22 PM (15 years ago)
Author:
livings124
Message:

trunk: Leopard: Time Machine will ignore incomplete files

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEWS

    r3640 r3667  
    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
  • trunk/macosx/Controller.m

    r3664 r3667  
    22542254}
    22552255
    2256 #warning need?
    22572256- (id) tableView: (NSTableView *) tableView objectValueForTableColumn: (NSTableColumn *) tableColumn row: (int) row
    22582257{
  • trunk/macosx/Torrent.m

    r3645 r3667  
    14761476   
    14771477    [self update];
     1478   
     1479    //mark incomplete files to be ignored by Time Machine
     1480    if ([NSApp isOnLeopardOrBetter])
     1481    {
     1482        NSURL *url = [NSURL fileURLWithPath: [[self downloadFolder] stringByAppendingPathComponent: [self name]]];
     1483        CSBackupSetItemExcluded((CFURLRef)url, ![self allDownloaded], false);
     1484    }
     1485   
    14781486    return self;
    14791487}
     
    16101618            fDateCompleted = [[NSDate alloc] init];
    16111619           
     1620            //allow to be backed up by Time Machine
     1621            if ([NSApp isOnLeopardOrBetter])
     1622            {
     1623                NSURL *url = [NSURL fileURLWithPath: [[self downloadFolder] stringByAppendingPathComponent: [self name]]];
     1624                CSBackupSetItemExcluded((CFURLRef)url, false, false);
     1625            }
     1626           
    16121627            fStat = tr_torrentStat(fHandle);
    16131628            [[NSNotificationCenter defaultCenter] postNotificationName: @"TorrentFinishedDownloading" object: self];
     
    16151630       
    16161631        case TR_CP_INCOMPLETE:
     1632            //do not allow to be backed up by Time Machine
     1633            if ([NSApp isOnLeopardOrBetter])
     1634            {
     1635                NSURL *url = [NSURL fileURLWithPath: [[self downloadFolder] stringByAppendingPathComponent: [self name]]];
     1636                CSBackupSetItemExcluded((CFURLRef)url, true, false);
     1637            }
     1638           
    16171639            [[NSNotificationCenter defaultCenter] postNotificationName: @"TorrentRestartedDownloading" object: self];
    16181640            break;
Note: See TracChangeset for help on using the changeset viewer.