Skip to content

Commit 90a4f4a

Browse files
committed
up
1 parent 3a2fd6b commit 90a4f4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backends/apple/coreml/runtime/delegate/ETCoreMLAssetManager.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ bool set_total_assets_size(size_t total_size,
207207
return dirURL;
208208
}
209209

210-
bool is_empty_directory_or_not_exist(NSURL *dirURL, NSFileManager *fm, NSError * __autoreleasing *error) {
210+
bool is_missing_or_empty_directory(NSURL *dirURL, NSFileManager *fm, NSError * __autoreleasing *error) {
211211
NSString *dirPath = dirURL.path;
212212
BOOL isDir = NO;
213213
BOOL doesFileExist = dirPath && [fm fileExistsAtPath:dirPath isDirectory:&isDir];
@@ -350,7 +350,7 @@ - (nullable instancetype)initWithDatabase:(const std::shared_ptr<Database>&)data
350350
(void)[fileManager setAttributes:attrs ofItemAtPath:managedStagingDirectoryURL.path error:nil]; // best-effort
351351

352352
// If directory is empty then purge the stores
353-
if (::is_empty_directory_or_not_exist(managedAssetsDirectoryURL, fileManager, nil)) {
353+
if (::is_missing_or_empty_directory(managedAssetsDirectoryURL, fileManager, nil)) {
354354
assetsMetaStore.impl()->purge(ec);
355355
assetsStore.impl()->purge(ec);
356356
}

0 commit comments

Comments
 (0)