fix copy bundled files for ios
This commit is contained in:
parent
125dd0d1c7
commit
e32df4e815
|
@ -75,9 +75,14 @@ void copy_bundled_realm_files()
|
||||||
if (![path containsString:@".realm"]) {
|
if (![path containsString:@".realm"]) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
NSError *error;
|
|
||||||
if (![manager copyItemAtPath:[resourcePath stringByAppendingPathComponent:path] toPath:[docsDir stringByAppendingPathComponent:path] error:&error]) {
|
NSString *docsPath = [docsDir stringByAppendingPathComponent:path];
|
||||||
throw std::runtime_error((std::string)"Failed to copy file at path " + path.UTF8String);
|
if ([manager fileExistsAtPath:docsPath]) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (![manager copyItemAtPath:[resourcePath stringByAppendingPathComponent:path] toPath:docsPath error:nil]) {
|
||||||
|
throw std::runtime_error((std::string)"Failed to copy file at path " + path.UTF8String + " to path " + docsPath.UTF8String);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue