From 980a5c0aad88c4cd7a0438bad79a8d65b4a02130 Mon Sep 17 00:00:00 2001 From: tianp Date: Mon, 4 Aug 2025 18:03:05 +0800 Subject: [PATCH] =?UTF-8?q?copy=E6=8E=A5=E5=8F=A3=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tianp Change-Id: I78eb7e30d2c68fa70503f54e1d6e4db4edd5c9f7 --- .../js/src/mod_fs/properties/copy_core.cpp | 18 +++++++++--------- .../kits/js/src/mod_fs/properties/copy_core.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) 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 601c68f9d..edd5595b0 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 387792260..2637f4d77 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" -- Gitee