diff --git a/interfaces/kits/js/src/mod_fs/properties/copy_core.cpp b/interfaces/kits/js/src/mod_fs/properties/copy_core.cpp index 601c68f9d34d62b0df7130214c517142b915b781..edd5595b00ce27b5949f08e00bdd4e6f4f8eea44 100644 --- a/interfaces/kits/js/src/mod_fs/properties/copy_core.cpp +++ b/interfaces/kits/js/src/mod_fs/properties/copy_core.cpp @@ -37,8 +37,8 @@ #include "filemgmt_libhilog.h" #include "fs_utils.h" #include "if_system_ability_manager.h" -#include "iservice_registry.h" #include "ipc_skeleton.h" +#include "iservice_registry.h" #include "system_ability_definition.h" #include "trans_listener_core.h" #include "utils_log.h" @@ -194,7 +194,7 @@ int CopyCore::CheckOrCreatePath(const std::string &destPath) { std::error_code errCode; if (!filesystem::exists(destPath, errCode) && errCode.value() == ERRNO_NOERR) { - HILOGI("destPath not exist"); + HILOGI("DestPath not exist"); auto file = open(destPath.c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP); if (file < 0) { HILOGE("Error opening file descriptor. errno = %{public}d", errno); @@ -253,14 +253,14 @@ int CopyCore::CopySubDir(const string &srcPath, const string &destPath, std::sha return res; } } else if (errCode.value() != ERRNO_NOERR) { - HILOGE("fs exists fail, errcode is %{public}d", errCode.value()); + HILOGE("Fs exists fail, errcode is %{public}d", errCode.value()); return errCode.value(); } uint32_t watchEvents = IN_MODIFY; if (infos->notifyFd >= 0) { int newWd = inotify_add_watch(infos->notifyFd, destPath.c_str(), watchEvents); if (newWd < 0) { - HILOGE("inotify_add_watch, newWd is unvaild, newWd = %{public}d", newWd); + HILOGE("Inotify_add_watch, newWd is unvaild, newWd = %{public}d", newWd); return errno; } { @@ -409,7 +409,7 @@ int CopyCore::ExecLocal(std::shared_ptr infos, std::shared_ptrdestPath); if (ret != ERRNO_NOERR) { - HILOGE("check or create fail, error code is %{public}d", ret); + HILOGE("Check or create fail, error code is %{public}d", ret); return ret; } } @@ -487,7 +487,7 @@ std::shared_ptr CopyCore::RegisterListener(const std::shared_p void CopyCore::UnregisterListener(std::shared_ptr fileInfos) { if (fileInfos == nullptr) { - HILOGE("fileInfos is nullptr"); + HILOGE("FileInfos is nullptr"); return; } std::lock_guard lock(mutex_); @@ -502,11 +502,11 @@ void CopyCore::UnregisterListener(std::shared_ptr fileInfos) void CopyCore::ReceiveComplete(std::shared_ptr entry) { if (entry == nullptr) { - HILOGE("entry pointer is nullptr."); + HILOGE("Entry pointer is nullptr."); return; } if (entry->callback == nullptr) { - HILOGE("entry callback pointer is nullptr."); + HILOGE("Entry callback pointer is nullptr."); return; } auto processedSize = entry->progressSize; @@ -516,7 +516,7 @@ void CopyCore::ReceiveComplete(std::shared_ptr entry) entry->callback->maxProgressSize = processedSize; auto listener = entry->callback->listener; if (listener == nullptr) { - HILOGE("listener pointer is nullptr."); + HILOGE("Listener pointer is nullptr."); return; } listener->InvokeListener(processedSize, entry->totalSize); diff --git a/interfaces/kits/js/src/mod_fs/properties/copy_core.h b/interfaces/kits/js/src/mod_fs/properties/copy_core.h index 38779226062c433f42bc60b371d88aa76e463e87..2637f4d7774448ec2606989c0646c0e80137e0f5 100644 --- a/interfaces/kits/js/src/mod_fs/properties/copy_core.h +++ b/interfaces/kits/js/src/mod_fs/properties/copy_core.h @@ -19,8 +19,8 @@ #include #include #include -#include #include +#include #include "bundle_mgr_client_impl.h" #include "filemgmt_libfs.h"