fix: can't write environ to storage
m_environ maybe empty when it is be set more than once. and the key is already exists in storage.
This commit is contained in:
parent
d541c433bb
commit
f1031391ea
@ -573,7 +573,7 @@ void ApplicationService::setEnviron(const QString &value) noexcept
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto appId = id();
|
auto appId = id();
|
||||||
if (!m_environ.isEmpty()) {
|
if (!storagePtr->readApplicationValue(appId, ApplicationPropertiesGroup, Environ).isNull()) {
|
||||||
if (!storagePtr->updateApplicationValue(appId, ApplicationPropertiesGroup, Environ, value)) {
|
if (!storagePtr->updateApplicationValue(appId, ApplicationPropertiesGroup, Environ, value)) {
|
||||||
sendErrorReply(QDBusError::Failed, "update environ failed.");
|
sendErrorReply(QDBusError::Failed, "update environ failed.");
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user