Änderung

- Key von Directory auf File geändert
- Abfrage ob SubKey leer oder nul ist dazu
This commit is contained in:
Hoeglinger Eugen 2022-08-30 09:06:21 +02:00
parent a379eba0a9
commit cb9e25600d
14 changed files with 10 additions and 3 deletions

Binary file not shown.

View File

@ -288,7 +288,14 @@ namespace Eugen.ESystem
/// <returns>'True' if the sub key exists, otherwise 'false'</returns> /// <returns>'True' if the sub key exists, otherwise 'false'</returns>
public bool SubKeyExists() public bool SubKeyExists()
{ {
return Directory.Exists(RoamingPath + "\\" + MainKey + "\\" + SubKey); if (String.IsNullOrEmpty(SubKey))
{
return false;
}
else
{
return Directory.Exists(RoamingPath + "\\" + MainKey + "\\" + SubKey);
}
} }
/// <summary> /// <summary>
@ -299,11 +306,11 @@ namespace Eugen.ESystem
{ {
if (SubKeyExists()) if (SubKeyExists())
{ {
return Directory.Exists(RoamingPath + "\\" + MainKey + "\\" + SubKey + "\\" + Key); return File.Exists(RoamingPath + "\\" + MainKey + "\\" + SubKey + "\\" + Key);
} }
else else
{ {
return Directory.Exists(RoamingPath + "\\" + MainKey + "\\" + Key); return File.Exists(RoamingPath + "\\" + MainKey + "\\" + Key);
} }
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.