Skip to content

Commit 69c899b

Browse files
committed
a little cleanup
1 parent ee7b823 commit 69c899b

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

FlashpointSecurePlayer/FlashpointSecurePlayer.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@
9898
<Compile Include="OldCPUSimulator.cs" />
9999
<Compile Include="ProgressManager.cs" />
100100
<Compile Include="RunAsAdministrator.cs" />
101-
<Compile Include="Settings.cs" />
102101
<Compile Include="Shared.cs" />
103102
<Compile Include="SingleInstance.cs" />
104103
<Compile Include="ProcessSync.cs" />

FlashpointSecurePlayer/RegistryBackups.cs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -981,11 +981,7 @@ public async Task StopImportAsync() {
981981
break;
982982
case TYPE.VALUE:
983983
try {
984-
if (String.IsNullOrEmpty(activeRegistryBackupElement._ValueExpanded)) {
985-
SetValueInRegistryView(keyName, registryBackupElement.ValueName, registryBackupElement.Value, registryBackupElement.ValueKind.GetValueOrDefault(), registryView);
986-
} else {
987-
SetValueInRegistryView(keyName, registryBackupElement.ValueName, activeRegistryBackupElement._ValueExpanded, registryBackupElement.ValueKind.GetValueOrDefault(), registryView);
988-
}
984+
SetValueInRegistryView(keyName, registryBackupElement.ValueName, String.IsNullOrEmpty(activeRegistryBackupElement._ValueExpanded) ? registryBackupElement.Value : activeRegistryBackupElement._ValueExpanded, registryBackupElement.ValueKind.GetValueOrDefault(), registryView);
989985
} catch (FormatException) {
990986
// value marked for deletion
991987
Deactivate();
@@ -1102,14 +1098,8 @@ public async Task StopImportAsync() {
11021098
if (value == null) {
11031099
clear = true;
11041100
} else {
1105-
if (String.IsNullOrEmpty(activeRegistryBackupElement._ValueExpanded)) {
1106-
if (value.ToString() != registryBackupElement.Value) {
1107-
clear = true;
1108-
}
1109-
} else {
1110-
if (value.ToString() != activeRegistryBackupElement._ValueExpanded) {
1111-
clear = true;
1112-
}
1101+
if (value.ToString() != (String.IsNullOrEmpty(activeRegistryBackupElement._ValueExpanded) ? registryBackupElement.Value : activeRegistryBackupElement._ValueExpanded)) {
1102+
clear = true;
11131103
}
11141104
}
11151105

0 commit comments

Comments
 (0)