diff --git a/interfaces/innerkits/native/remote_file_share/src/remote_file_share.cpp b/interfaces/innerkits/native/remote_file_share/src/remote_file_share.cpp index 9cd4c0d289d05f30a596b1f8acb31993e562eea7..65483cc164a074fde81b3c69d621c33332688f3b 100644 --- a/interfaces/innerkits/native/remote_file_share/src/remote_file_share.cpp +++ b/interfaces/innerkits/native/remote_file_share/src/remote_file_share.cpp @@ -670,7 +670,8 @@ static sptr GetStorageManager() int32_t count = 0; sptr storageManager = nullptr; - while (storageManager == nullptr && count++ < GET_CLIENT_RETRY_TIMES) { + while (storageManager == nullptr && count < GET_CLIENT_RETRY_TIMES) { + count++; auto storageObj = saMgr->GetSystemAbility(STORAGE_MANAGER_MANAGER_ID); if (storageObj == nullptr) { LOGE("Get starage manger failed.");