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 45403ca6d82752fcac6b36e2cf72b2f063305337..601c68f9d34d62b0df7130214c517142b915b781 100644 --- a/interfaces/kits/js/src/mod_fs/properties/copy_core.cpp +++ b/interfaces/kits/js/src/mod_fs/properties/copy_core.cpp @@ -72,6 +72,7 @@ static int OpenSrcFile(const string &srcPth, std::shared_ptr infos, HILOGE("Failed to get remote object"); return ENOMEM; } + dataShareHelper = DataShare::DataShareHelper::Creator(remote->AsObject(), MEDIALIBRARY_DATA_URI); if (!dataShareHelper) { HILOGE("Failed to connect to datashare");