Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/shared/Core/Interop/Linux/LinuxSettings.cs

This comment was marked as spam.

Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,17 @@ protected internal override bool TryGetExternalDefault(string section, string sc

_extConfigCache ??= ReadExternalConfiguration();

if (_extConfigCache is null)
return false; // No external config found (or failed to read)

string name = string.IsNullOrWhiteSpace(scope)
? $"{section}.{property}"
: $"{section}.{scope}.{property}";

// Check if the setting exists in the configuration
if (!_extConfigCache?.TryGetValue(name, out value) ?? false)
if (!_extConfigCache.TryGetValue(name, out value))
{
// No property exists (or failed to read config)
// No property exists
return false;
}

Expand Down Expand Up @@ -90,4 +93,4 @@ private IDictionary<string, string> ReadExternalConfiguration()
return null;
}
}
}
}
Loading