Commit 3e6442ed authored by Felix Paul Kühne's avatar Felix Paul Kühne

Migration: fix behavior when used in restricted environments with no access to app groups

parent 1dcfa3bf
...@@ -101,6 +101,10 @@ ...@@ -101,6 +101,10 @@
return NO; return NO;
} }
if ([self _groupURL] == nil) {
return NO;
}
NSString *oldPersistentStorePath = [[self _oldBasePath] stringByAppendingPathComponent: @"MediaLibrary.sqlite"]; NSString *oldPersistentStorePath = [[self _oldBasePath] stringByAppendingPathComponent: @"MediaLibrary.sqlite"];
return [[NSFileManager defaultManager] fileExistsAtPath:oldPersistentStorePath]; return [[NSFileManager defaultManager] fileExistsAtPath:oldPersistentStorePath];
} }
...@@ -113,7 +117,6 @@ ...@@ -113,7 +117,6 @@
} }
- (NSURL *)_groupURL { - (NSURL *)_groupURL {
if (![[NSFileManager defaultManager] respondsToSelector:@selector(containerURLForSecurityApplicationGroupIdentifier:)]) { if (![[NSFileManager defaultManager] respondsToSelector:@selector(containerURLForSecurityApplicationGroupIdentifier:)]) {
return nil; return nil;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment