diff --git a/interfaces/kits/js/src/mod_fs/properties/copy.cpp b/interfaces/kits/js/src/mod_fs/properties/copy.cpp index 6e9ce72b3dd835973e29a5979596c30d4d118d67..1532bfc48ddfefbc0ab689faa8839d8863e93c13 100644 --- a/interfaces/kits/js/src/mod_fs/properties/copy.cpp +++ b/interfaces/kits/js/src/mod_fs/properties/copy.cpp @@ -522,19 +522,19 @@ std::shared_ptr Copy::RegisterListener(napi_env env, const std return callback; } -void Copy::UnregisterListener(std::shared_ptr infos) +void Copy::UnregisterListener(std::shared_ptr fileInfos) { - if (infos == nullptr) { - HILOGE("infos is nullptr"); + if (fileInfos == nullptr) { + HILOGE("fileInfos is nullptr"); return; } std::lock_guard lock(mutex_); - auto iter = jsCbMap_.find(*infos); + auto iter = jsCbMap_.find(*fileInfos); if (iter == jsCbMap_.end()) { HILOGI("It is not be registered."); return; } - jsCbMap_.erase(*infos); + jsCbMap_.erase(*fileInfos); } void Copy::ReceiveComplete(uv_work_t *work, int stat)