(fix) many OCS (non-standard) fixes

This commit is contained in:
Ludovic Marcotte committed 2018-09-21 13:06:15 -04:00
1 parent ba9960b97a
commit 3d9fe30373
4 files changed
+39 -15

No files matched your search

+11 -3
View File
@@ -190,7 +190,7 @@ static BOOL _singleStoreMode = NO;
return fm;
}
- (NSDictionary *) loadDefaultFolderTypes
- (NSDictionary *) loadDefaultFolderTypes: (NSString *) driver
{
NSMutableDictionary *typeMap;
NSArray *types;
@@ -212,7 +212,15 @@ static BOOL _singleStoreMode = NO;
GCSFolderType *typeObject;
type = [[types objectAtIndex:i] stringByDeletingPathExtension];
typeObject = [GCSFolderType folderTypeWithName: type];
// We skip type files associated to drivers directly, since
// [GCSFolderType folderTypeWithName:driver] will handle the
// mojo directly
if ([type rangeOfString: [NSString stringWithFormat: @"-%@", driver]].length)
continue;
typeObject = [GCSFolderType folderTypeWithName: type
driver: driver];
[self debugWithFormat:@" %@: %s",
type, [typeObject isNotNull] ? "OK" : "FAIL"];
@@ -302,7 +310,7 @@ static BOOL _singleStoreMode = NO;
}
/* register default folder types */
nameToType = [[self loadDefaultFolderTypes] copy];
nameToType = [[self loadDefaultFolderTypes: [_infoUrl scheme]] copy];
}
return self;
}