summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macosx/HBController.m24
1 files changed, 20 insertions, 4 deletions
diff --git a/macosx/HBController.m b/macosx/HBController.m
index 270b40186..85d0fd12e 100644
--- a/macosx/HBController.m
+++ b/macosx/HBController.m
@@ -1212,13 +1212,29 @@
job.title = nil;
[jobs addObject:job];
[job release];
+ }
+ }
- if ([[NSFileManager defaultManager] fileExistsAtPath:job.destURL.path] || [fQueueController jobExistAtURL:job.destURL])
- {
- fileExists = YES;
- }
+ NSMutableSet *destinations = [[NSMutableSet alloc] init];
+ for (HBJob *job in jobs)
+ {
+ if ([destinations containsObject:job.destURL])
+ {
+ fileExists = YES;
+ break;
+ }
+ else
+ {
+ [destinations addObject:job.destURL];
+ }
+
+ if ([[NSFileManager defaultManager] fileExistsAtPath:job.destURL.path] || [fQueueController jobExistAtURL:job.destURL])
+ {
+ fileExists = YES;
+ break;
}
}
+ [destinations release];
if (fileExists)
{