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;