Ignore:
Timestamp:
Nov 1, 2007, 2:04:50 PM (15 years ago)
Author:
livings124
Message:

trunk: attempt to fix Time Machine setting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r3667 r3676  
    219219    fStat = tr_torrentStat(fHandle);
    220220   
     221    #warning find a better way
     222    //check if the file is created for Time Machine
     223    if (fNeedSetTimeMachine)
     224    {
     225        NSURL *url = [NSURL fileURLWithPath: [[self downloadFolder] stringByAppendingPathComponent: [self name]]];
     226        fNeedSetTimeMachine = CSBackupSetItemExcluded((CFURLRef)url, ![self allDownloaded], false) != noErr;
     227    }
     228   
    221229    //check to stop for ratio
    222230    float stopRatio;
     
    14811489    {
    14821490        NSURL *url = [NSURL fileURLWithPath: [[self downloadFolder] stringByAppendingPathComponent: [self name]]];
    1483         CSBackupSetItemExcluded((CFURLRef)url, ![self allDownloaded], false);
    1484     }
     1491        fNeedSetTimeMachine = CSBackupSetItemExcluded((CFURLRef)url, ![self allDownloaded], false) != noErr;
     1492    }
     1493    else
     1494        fNeedSetTimeMachine = NO;
    14851495   
    14861496    return self;
Note: See TracChangeset for help on using the changeset viewer.