aboutsummaryrefslogtreecommitdiffstats
path: root/Drop Serve
diff options
context:
space:
mode:
Diffstat (limited to 'Drop Serve')
-rw-r--r--Drop Serve/DropZone.m13
1 files changed, 12 insertions, 1 deletions
diff --git a/Drop Serve/DropZone.m b/Drop Serve/DropZone.m
index 185ac28..8eb156a 100644
--- a/Drop Serve/DropZone.m
+++ b/Drop Serve/DropZone.m
@@ -44,7 +44,18 @@
if ([[pboard types] containsObject:NSFilenamesPboardType]) {
NSArray *files = [pboard propertyListForType:NSFilenamesPboardType];
- NSLog(@"%@", files);
+ for (int i = 0; i < [files count]; i++) {
+ NSString *file = [files objectAtIndex:i];
+ BOOL isDirectory = false;
+
+ if ([[NSFileManager defaultManager]
+ fileExistsAtPath:file
+ isDirectory:&isDirectory]
+ && isDirectory) {
+ NSLog(@"%@", file);
+ break;
+ }
+ }
}
return YES;