From 87baf39a8e4872004de8e1a78e8d464e7ca388f3 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sat, 5 Jan 2008 04:30:20 +0000 Subject: [PATCH] when moving a file, have time machine still ignore it --- macosx/Torrent.m | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/macosx/Torrent.m b/macosx/Torrent.m index adea40918..66d6bb485 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -1666,8 +1666,22 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void * - (void) updateDownloadFolder { + //remove old Time Machine location + if ([NSApp isOnLeopardOrBetter]) + { + NSURL *url = [NSURL fileURLWithPath: [[self downloadFolder] stringByAppendingPathComponent: [self name]]]; + fNeedSetTimeMachine = CSBackupSetItemExcluded((CFURLRef)url, false, false) != noErr; + } + NSString * folder = [self shouldUseIncompleteFolderForName: [self name]] ? fIncompleteFolder : fDownloadFolder; tr_torrentSetFolder(fHandle, [folder UTF8String]); + + //update Time Machine location + if ([NSApp isOnLeopardOrBetter]) + { + NSURL *url = [NSURL fileURLWithPath: [folder stringByAppendingPathComponent: [self name]]]; + fNeedSetTimeMachine = CSBackupSetItemExcluded((CFURLRef)url, ![self allDownloaded], false) != noErr; + } } //status has been retained