From e07ec83f654b621de4c1e39093ee56b39e180195 Mon Sep 17 00:00:00 2001 From: zhaominyong Date: Tue, 25 Jan 2022 16:42:09 +0800 Subject: [PATCH] =?UTF-8?q?umount=E5=8D=B8=E8=BD=BD=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E6=8C=82=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backup-daemon/myprocess/mountbackupprocess.h | 2 +- backup-daemon/udisksystemrestoreproxy.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backup-daemon/myprocess/mountbackupprocess.h b/backup-daemon/myprocess/mountbackupprocess.h index 82afbe0..aa11598 100755 --- a/backup-daemon/myprocess/mountbackupprocess.h +++ b/backup-daemon/myprocess/mountbackupprocess.h @@ -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: diff --git a/backup-daemon/udisksystemrestoreproxy.cpp b/backup-daemon/udisksystemrestoreproxy.cpp index ab4d704..57ca28f 100755 --- a/backup-daemon/udisksystemrestoreproxy.cpp +++ b/backup-daemon/udisksystemrestoreproxy.cpp @@ -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;