mirror of
https://gitee.com/openharmony/filemanagement_storage_service
synced 2024-11-23 23:19:57 +00:00
update services/storage_daemon/mtp/src/mtp_device_manager.cpp.
Signed-off-by: 李尚 <lishang21@huawei.com>
This commit is contained in:
parent
d2561226d4
commit
fbc9ad345a
@ -35,8 +35,7 @@ MtpDeviceManager::MtpDeviceManager() {}
|
||||
|
||||
MtpDeviceManager::~MtpDeviceManager()
|
||||
{
|
||||
LOGI("MtpDeviceManager Destructor.");
|
||||
|
||||
LOGI("MtpDeviceManager Destructor.");
|
||||
}
|
||||
|
||||
int32_t MtpDeviceManager::MountDevice(const MtpDeviceInfo &device)
|
||||
@ -76,6 +75,8 @@ int32_t MtpDeviceManager::MountDevice(const MtpDeviceInfo &device)
|
||||
}
|
||||
if (!success || (result.size() != 0)) {
|
||||
LOGE("Run mtpfs cmd to mount mtp device failed.");
|
||||
std::vector<std::string> result;
|
||||
CmdUtils::GetInstance().RunCmd("umount " + device.path, result);
|
||||
DelFolder(device.path);
|
||||
isMounting = false;
|
||||
return E_MTP_MOUNT_FAILED;
|
||||
@ -84,7 +85,7 @@ int32_t MtpDeviceManager::MountDevice(const MtpDeviceInfo &device)
|
||||
LOGI("Run mtpfs cmd to mount mtp device success.");
|
||||
isMounting = false;
|
||||
StorageManagerClient client;
|
||||
client.NotifyMtpMounted(device.id, device.path);
|
||||
client.NotifyMtpMounted(device.id, device.path, device.vendor + " " + device.product);
|
||||
return E_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user