diff --git a/services/src/client/file_manager_proxy.cpp b/services/src/client/file_manager_proxy.cpp index cd7a1145a4941ed2aede53f7a4dcfc2ffd6669bd..5fc4431d08b91b7eae0e08b14bdfd2f73e2e2feb 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 174602466ca30489fc6792a7ec9398316a38d579..dbc2520c03dab003f8814dd7a4b0fd6cb9589edb 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 dfb5ecad4029cbc11786bf90dd217e4ebbf25c0b..8220a0ca5841b05d082625dbe1b27c8d6ee77fce 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 600ee20cdd8b2223ba13fce365d0972e675e1e7e..31e1bc4095a5da5cda1d34854108ea205bb14b5a 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 265189b026874e9afe0754f14680660dd2f7eee2..371eb5356c69e5efcf8ec4d5113307367bc19cbb 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);