mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
Merge pull request #157 from listenerri/cmdline-read
fix: cmdline read failed
This commit is contained in:
commit
1a143bc5e1
@ -152,9 +152,14 @@ void OverlayWarningPlugin::loadPlugin()
|
|||||||
bool OverlayWarningPlugin::isOverlayRoot()
|
bool OverlayWarningPlugin::isOverlayRoot()
|
||||||
{
|
{
|
||||||
// ignore live/recovery mode
|
// ignore live/recovery mode
|
||||||
if (QString(QFile("/proc/cmdline").readAll()).contains("boot=live")) {
|
QFile cmdline("/proc/cmdline");
|
||||||
|
cmdline.open(QFile::ReadOnly);
|
||||||
|
QString content(cmdline.readAll());
|
||||||
|
cmdline.close();
|
||||||
|
if (content.contains("boot=live")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return QString(QStorageInfo::root().fileSystemType()) == OverlayFileSystemType;
|
return QString(QStorageInfo::root().fileSystemType()) == OverlayFileSystemType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user