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:
		@ -573,7 +573,7 @@ void ApplicationService::setEnviron(const QString &value) noexcept
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    auto appId = id();
 | 
			
		||||
    if (!m_environ.isEmpty()) {
 | 
			
		||||
    if (!storagePtr->readApplicationValue(appId, ApplicationPropertiesGroup, Environ).isNull()) {
 | 
			
		||||
        if (!storagePtr->updateApplicationValue(appId, ApplicationPropertiesGroup, Environ, value)) {
 | 
			
		||||
            sendErrorReply(QDBusError::Failed, "update environ failed.");
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user