Make sure to create the inner fs when detecting.
This commit is contained in:
parent
7993257541
commit
9970fb7b1d
|
@ -286,10 +286,7 @@ bool luks::cryptOpen(const QString& deviceNode)
|
|||
if (mapperNode.isEmpty())
|
||||
return false;
|
||||
|
||||
FileSystem::Type innerFsType = detectFileSystem(mapperNode);
|
||||
m_innerFs = FileSystemFactory::cloneWithNewType(innerFsType,
|
||||
*this);
|
||||
|
||||
loadInnerFilesystem(mapperNode);
|
||||
m_isCryptOpen = (m_innerFs != nullptr);
|
||||
|
||||
if (m_isCryptOpen)
|
||||
|
@ -328,6 +325,13 @@ bool luks::cryptClose(const QString& deviceNode)
|
|||
return false;
|
||||
}
|
||||
|
||||
void luks::loadInnerFilesystem(const QString& mapperNode)
|
||||
{
|
||||
FileSystem::Type innerFsType = detectFileSystem(mapperNode);
|
||||
m_innerFs = FileSystemFactory::cloneWithNewType(innerFsType,
|
||||
*this);
|
||||
}
|
||||
|
||||
bool luks::mount(const QString& deviceNode, const QString& mountPoint)
|
||||
{
|
||||
if (!m_isCryptOpen)
|
||||
|
|
|
@ -108,6 +108,8 @@ public:
|
|||
bool cryptOpen(const QString& deviceNode);
|
||||
bool cryptClose(const QString& deviceNode);
|
||||
|
||||
void loadInnerFilesystem(const QString& mapperNode);
|
||||
|
||||
virtual bool mount(const QString& deviceNode, const QString& mountPoint) override;
|
||||
virtual bool unmount(const QString& deviceNode) override;
|
||||
|
||||
|
|
|
@ -359,6 +359,8 @@ void LibPartedBackend::scanDevicePartitions(PedDevice*, Device& d, PedDisk* pedD
|
|||
luksFs->setCryptOpen(isCryptOpen);
|
||||
|
||||
if (isCryptOpen) {
|
||||
luksFs->loadInnerFilesystem(mapperNode);
|
||||
|
||||
mountPoint = mountPoints.findByDevice(mapperNode) ?
|
||||
mountPoints.findByDevice(mapperNode)->mountPoint() :
|
||||
QString();
|
||||
|
|
Loading…
Reference in New Issue