mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-23 12:39:29 +00:00
Drag and Drop support for File attachments
This commit is contained in:
@@ -20,6 +20,10 @@
|
||||
|
||||
- (void)addAttachment:(NSURL *)location toEntry:(KdbEntry *)anEntry {
|
||||
NSError *error = nil;
|
||||
NSDictionary *resourceKeys = [location resourceValuesForKeys:@[NSURLIsDirectoryKey] error:&error];
|
||||
if([resourceKeys[ NSURLIsDirectoryKey ] boolValue] == YES ) {
|
||||
return; // We do not add whol directories
|
||||
}
|
||||
NSString *fileName = [location lastPathComponent];
|
||||
if([anEntry isKindOfClass:[Kdb3Entry class]]) {
|
||||
Kdb3Entry *entry = (Kdb3Entry *)anEntry;
|
||||
|
||||
Reference in New Issue
Block a user