Skip to content

Commit

Permalink
Fix of version comparing
Browse files Browse the repository at this point in the history
  • Loading branch information
mfandreich committed Aug 31, 2017
1 parent 57bcb68 commit de35a2e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions UnityLauncher/Core/LaunchSettings/Project/ProjectInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class ProjectInfo : Notifier, IContext
Version = "",
};

public static ProjectInfo TryGetProjectInfo(string pathCandidate)
public static ProjectInfo TryGetProjectInfo(string pathCandidate, object parent = null)
{
if (string.IsNullOrEmpty(pathCandidate)) return null;
if (Directory.Exists(pathCandidate) && (Directory.GetFiles(pathCandidate).Length == 0 &&
Expand All @@ -31,7 +31,8 @@ public static ProjectInfo TryGetProjectInfo(string pathCandidate)
Path = pathCandidate,
Name = System.IO.Path.GetFileName(normalizedPath),
Author = "unknown",
Version = "unknown"
Version = "unknown",
Parent = parent
};
var t = new Thread(() =>
{
Expand Down
5 changes: 2 additions & 3 deletions UnityLauncher/Core/LaunchSettings/Project/ProjectModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,10 @@ private ProjectInfo[] GetRecentlyUsedProjects()
{
idx = 0;
}
var proj = ProjectInfo.TryGetProjectInfo(path);
var proj = ProjectInfo.TryGetProjectInfo(path, Context);
if (proj != null)
{
proj.Idx = idx;
proj.Parent = Context;
tmp.Add(proj);
}
}
Expand Down Expand Up @@ -127,7 +126,7 @@ public bool TrySetProjectByPath(string path)

if (proj == null)
{
proj = ProjectInfo.TryGetProjectInfo(path);
proj = ProjectInfo.TryGetProjectInfo(path, Context);
SelectedProject = proj;
}

Expand Down

0 comments on commit de35a2e

Please sign in to comment.