Skip to content

Commit

Permalink
Improve server detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Ciaran Fisher committed Aug 23, 2020
1 parent b411406 commit 04dbec2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Installer/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Security.AccessControl;
using System.Security.Principal;
Expand Down Expand Up @@ -856,7 +857,8 @@ private static List<string> FindValidDCSFolders(string path)
var config = directory + "\\config\\options.lua";
if (File.Exists(network) || File.Exists(config))
{
if (!directory.ToUpper().Contains("SERVER") && !directory.ToUpper().Contains("DEDICATED"))
var split = directory.Split(Path.DirectorySeparatorChar);
if (!split.Last().ToUpper().Contains("SERVER") && !split.Last().ToUpper().Contains("DEDICATED"))
{
Logger.Info($"Found DCS Saved Games Path {directory}");
paths.Add(directory);
Expand Down

0 comments on commit 04dbec2

Please sign in to comment.