From 67913adae5acc4079d1cf0d005e3083ed7ee7bcf Mon Sep 17 00:00:00 2001 From: panqiangbiao Date: Sat, 29 Jan 2022 14:15:46 +0800 Subject: [PATCH] fix code issue Signed-off-by: panqiangbiao --- services/src/client/file_manager_proxy.cpp | 2 +- services/src/fileoper/media_file_oper.cpp | 2 +- services/src/fileoper/media_file_oper.h | 2 +- services/src/fileoper/media_file_utils.cpp | 2 +- services/src/fileoper/media_file_utils.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/services/src/client/file_manager_proxy.cpp b/services/src/client/file_manager_proxy.cpp index cd7a1145..5fc4431d 100644 --- a/services/src/client/file_manager_proxy.cpp +++ b/services/src/client/file_manager_proxy.cpp @@ -89,7 +89,7 @@ int FileManagerProxy::ListFile(const std::string &type, const std::string &path, data.WriteInt32(count); MessageParcel reply; MessageOption messageOption; - uint32_t code = Equipment::INTERNAL_STORAGE; + uint32_t code = Operation::LIST_FILE; if (op.GetDevInfo().GetName() == "external_storage") { code = (Equipment::EXTERNAL_STORAGE << EQUIPMENT_SHIFT) | Operation::LIST_FILE; } diff --git a/services/src/fileoper/media_file_oper.cpp b/services/src/fileoper/media_file_oper.cpp index 17460246..dbc2520c 100644 --- a/services/src/fileoper/media_file_oper.cpp +++ b/services/src/fileoper/media_file_oper.cpp @@ -77,7 +77,7 @@ int MediaFileOper::CreateFile(const std::string &name, const std::string &path, return MediaFileUtils::DoInsert(name, path, type, uri); } -int MediaFileOper::ListFile(const string type, const string &path, int offset, int count, MessageParcel &reply) const +int MediaFileOper::ListFile(const string &type, const string &path, int offset, int count, MessageParcel &reply) const { shared_ptr result; int res = MediaFileUtils::DoListFile(type, path, offset, count, result); diff --git a/services/src/fileoper/media_file_oper.h b/services/src/fileoper/media_file_oper.h index dfb5ecad..8220a0ca 100644 --- a/services/src/fileoper/media_file_oper.h +++ b/services/src/fileoper/media_file_oper.h @@ -26,7 +26,7 @@ public: int OperProcess(uint32_t code, MessageParcel &data, MessageParcel &reply) const override; private: int CreateFile(const std::string &name, const std::string &path, std::string &uri) const; - int ListFile(const std::string type, const std::string &path, int offset, int count, MessageParcel &data) const; + int ListFile(const std::string &type, const std::string &path, int offset, int count, MessageParcel &data) const; int Mkdir(const std::string &name, const std::string &path) const; }; } // namespace FileManagerService diff --git a/services/src/fileoper/media_file_utils.cpp b/services/src/fileoper/media_file_utils.cpp index 600ee20c..31e1bc40 100644 --- a/services/src/fileoper/media_file_utils.cpp +++ b/services/src/fileoper/media_file_utils.cpp @@ -259,7 +259,7 @@ bool GetAlbumPath(const string &name, const string &path, string &albumPath) return GetPathFromAlbumPath(path, albumPath); } -int MediaFileUtils::DoListFile(const string type, const string &path, int offset, int count, +int MediaFileUtils::DoListFile(const string &type, const string &path, int offset, int count, shared_ptr &result) { string selection; diff --git a/services/src/fileoper/media_file_utils.h b/services/src/fileoper/media_file_utils.h index 265189b0..371eb535 100644 --- a/services/src/fileoper/media_file_utils.h +++ b/services/src/fileoper/media_file_utils.h @@ -28,7 +28,7 @@ class MediaFileUtils { public: MediaFileUtils(); ~MediaFileUtils(); - static int DoListFile(const std::string type, const std::string &path, int offset, int count, + static int DoListFile(const std::string &type, const std::string &path, int offset, int count, std::shared_ptr &result); static std::shared_ptr DoQuery(std::string selection, std::vector selectionArgs); -- Gitee