mirror of
https://gitee.com/openharmony/ai_neural_network_runtime
synced 2024-12-04 05:50:44 +00:00
!242 cache number invalid add
Merge pull request !242 from wangyifan/master
This commit is contained in:
commit
ea42fc43ce
@ -596,8 +596,8 @@ NNRT_API bool OH_NNModel_HasCache(const char *cacheDir, const char *modelName, u
|
||||
return false;
|
||||
}
|
||||
|
||||
if (fileNumber > FILE_NUMBER_MAX) {
|
||||
LOGE("OH_NNModel_HasCache fileNumber is more than 100");
|
||||
if (fileNumber <= 0 || fileNumber > FILE_NUMBER_MAX) {
|
||||
LOGE("OH_NNModel_HasCache fileNumber is invalid or more than 100");
|
||||
std::filesystem::remove_all(cacheInfoPath);
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user