Skip to content

Commit 69c73f5

Browse files
committed
ModApi.InterimSetup: misc changes
1 parent 4c4146b commit 69c73f5

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

ModApi.InterimSetup/ModApi.InterimSetup/MainWindow.xaml.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -311,18 +311,12 @@ bool VerifyPath(string path)
311311
{
312312
if (_isUpgradeInstall)
313313
{
314-
bool returnValue = false;
315314
string fileName = Path.GetFileName(path).ToLowerInvariant();
316-
if (File.Exists(path) && fileName.StartsWith("spore modapi") && fileName.EndsWith("exe"))
317-
returnValue = true;
318-
return returnValue;
315+
return File.Exists(path) && fileName.StartsWith("spore modapi") && fileName.EndsWith(".exe");
319316
}
320317
else
321318
{
322-
if (IsValidPath(PathTextBox.Text) && (PathTextBox.Text.ToLowerInvariant() != Environment.ExpandEnvironmentVariables(@"%userprofile%\Desktop").ToLowerInvariant()))
323-
return true;
324-
else
325-
return false;
319+
return IsValidPath(PathTextBox.Text) && (PathTextBox.Text.ToLowerInvariant() != Environment.ExpandEnvironmentVariables(@"%userprofile%\Desktop").ToLowerInvariant());
326320
}
327321
}
328322

0 commit comments

Comments
 (0)