SEBWIN-759, #606: Fixed bug in cursor path verification.
This commit is contained in:
parent
f7479cd1a8
commit
2ef7c2c5ec
1 changed files with 2 additions and 2 deletions
|
@ -66,7 +66,7 @@ namespace SafeExamBrowser.Runtime.Operations
|
||||||
private bool VerifyCursorConfiguration()
|
private bool VerifyCursorConfiguration()
|
||||||
{
|
{
|
||||||
var success = true;
|
var success = true;
|
||||||
var systemPath = $@"{Environment.ExpandEnvironmentVariables("%SystemRoot%")}\cursors\";
|
var systemPath = $@"{Environment.ExpandEnvironmentVariables("%SystemRoot%")}\Cursors\";
|
||||||
|
|
||||||
logger.Info($"Attempting to verify cursor configuration...");
|
logger.Info($"Attempting to verify cursor configuration...");
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ namespace SafeExamBrowser.Runtime.Operations
|
||||||
foreach (var cursor in cursors.Where(c => !string.IsNullOrWhiteSpace(c)))
|
foreach (var cursor in cursors.Where(c => !string.IsNullOrWhiteSpace(c)))
|
||||||
{
|
{
|
||||||
success &= registry.TryRead(RegistryValue.UserHive.Cursors_Key, cursor, out var value);
|
success &= registry.TryRead(RegistryValue.UserHive.Cursors_Key, cursor, out var value);
|
||||||
success &= value == default || !(value is string) || (value is string path && (string.IsNullOrWhiteSpace(path) || path.StartsWith(systemPath)));
|
success &= value == default || !(value is string) || (value is string path && (string.IsNullOrWhiteSpace(path) || path.StartsWith(systemPath, StringComparison.OrdinalIgnoreCase)));
|
||||||
|
|
||||||
if (!success)
|
if (!success)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue