mirror of
https://github.com/ksherlock/ample.git
synced 2024-10-31 15:04:56 +00:00
add some duplicate filtering when adding a disk image to the recent list.
This commit is contained in:
parent
0d88e3e93a
commit
59ce93bbc0
@ -108,6 +108,19 @@
|
||||
|
||||
// todo -- check if file is in the list already...
|
||||
|
||||
BOOL found = NO;
|
||||
// should really compare the volume id / ino I suppose.
|
||||
for (NSMutableDictionary *d in _content) {
|
||||
NSString *s = [d objectForKey: @"path"];
|
||||
if ([path compare: s] == NSOrderedSame) {
|
||||
found = YES;
|
||||
[d setObject: [NSDate new] forKey: @"date"];
|
||||
_dirty = YES; // ?
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found) return NO;
|
||||
|
||||
|
||||
NSFileManager *fm = [NSFileManager defaultManager];
|
||||
NSError *error;
|
||||
|
Loading…
Reference in New Issue
Block a user