Changeset 3675


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

0.9x: attempt to fix Time Machine setting

Location:
branches/0.9x/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/0.9x/macosx/Torrent.h

    r3485 r3675  
    6969   
    7070    NSDictionary * fQuickPauseDict;
     71   
     72    BOOL fNeedSetTimeMachine;
    7173}
    7274
  • branches/0.9x/macosx/Torrent.m

    r3668 r3675  
    218218    fStat = tr_torrentStat(fHandle);
    219219   
     220    #warning find a better way
     221    //check if the file is created for Time Machine
     222    if (fNeedSetTimeMachine)
     223    {
     224        NSURL *url = [NSURL fileURLWithPath: [[self downloadFolder] stringByAppendingPathComponent: [self name]]];
     225        fNeedSetTimeMachine = CSBackupSetItemExcluded((CFURLRef)url, ![self allDownloaded], false) != noErr;
     226    }
     227   
    220228    //check to stop for ratio
    221229    float stopRatio;
     
    14561464    {
    14571465        NSURL *url = [NSURL fileURLWithPath: [[self downloadFolder] stringByAppendingPathComponent: [self name]]];
    1458         CSBackupSetItemExcluded((CFURLRef)url, ![self allDownloaded], false);
    1459     }
     1466        fNeedSetTimeMachine = CSBackupSetItemExcluded((CFURLRef)url, ![self allDownloaded], false) != noErr;
     1467    }
     1468    else
     1469        fNeedSetTimeMachine = NO;
    14601470   
    14611471    return self;
Note: See TracChangeset for help on using the changeset viewer.