Fix detection of disabled Syncthing systemd unit in wizard
`isUnitAvailable()` would return false for disabled units (that could be enabled) so `canEnableOrStart()` must return true even if only `isDisabled()` returns true.
This commit is contained in:
parent
74580d382b
commit
67c4e806bd
|
@ -256,7 +256,7 @@ inline bool SyncthingService::isDisabled() const
|
|||
*/
|
||||
inline bool Data::SyncthingService::canEnableOrStart() const
|
||||
{
|
||||
return isUnitAvailable() && (isDisabled() || !isRunning());
|
||||
return (isUnitAvailable() && !isRunning()) || isDisabled();
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
Loading…
Reference in New Issue