umount卸载目录挂载

This commit is contained in:
zhaominyong 2022-01-25 16:42:09 +08:00
parent 7ef30fd92c
commit e07ec83f65
2 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ public:
bool umountBackupPartition();
static bool umount(const QString& mountPath);
bool umount(const QString& mountPath);
bool mount(const QString& source, const QString& target, const QString& options = "");
private:

View File

@ -322,10 +322,10 @@ bool UDiskSystemRestoreProxy::doPrepare()
Utils::mkpath(dstImgMountPath);
// 2、先卸载/backup/imgbackup上的mount
MountBackupProcess::umount(dstImgMountPath);
MountBackupProcess *processMount = new MountBackupProcess;
processMount->umount(dstImgMountPath);
// 3、将img文件挂载到/backup/imgbackup上
MountBackupProcess *processMount = new MountBackupProcess;
if (!processMount->mount(imgPath, dstImgMountPath)) {
emit checkResult(int(BackupResult::RESTOREDIR_PREPARE_FAILED));
return false;