From fbc7d6b827d1a5d7e98550c9be7e86f59794f7c5 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sat, 5 Jan 2008 18:30:52 +0000 Subject: [PATCH] when removing a torrent, allow it to be backed up by time machine again --- macosx/Torrent.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/macosx/Torrent.m b/macosx/Torrent.m index a7f01150b..e0f19fa2b 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -180,6 +180,13 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void * - (void) closeRemoveTorrent { + //allow the file to be index by Time Machine + if ([NSApp isOnLeopardOrBetter]) + { + NSURL *url = [NSURL fileURLWithPath: [[self downloadFolder] stringByAppendingPathComponent: [self name]]]; + CSBackupSetItemExcluded((CFURLRef)url, false, true); + } + tr_torrentRemoveSaved(fHandle); tr_torrentClose(fHandle); }