Skip to content

Commit 8f9adf4

Browse files
authoredFeb 10, 2023
Merge pull request #121 from PatHightree/project_date_on_bitlocker_volume
Fix for incorrect sorting of projects on bitlocker volumes
2 parents df43935 + 62b5325 commit 8f9adf4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎UnityLauncherPro/GetProjects.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,12 @@ static Project GetProjectInfo(string projectPath, bool getGitBranch = false, boo
146146

147147
//Console.WriteLine("valueName="+ valueName+" , projectName =" + projectName);
148148

149-
// get last modified date from folder
150-
DateTime? lastUpdated = folderExists ? Tools.GetLastModifiedTime(projectPath) : null;
149+
// get last modified date from most recent date of solution or folder
150+
string solutionPath = Path.Combine(projectPath, $"{projectName}.sln");
151+
bool solutionExists = File.Exists(solutionPath);
152+
DateTime? solutionLastUpdated = solutionExists ? Tools.GetLastModifiedTime(solutionPath) : null;
153+
DateTime? folderLastUpdated = folderExists ? Tools.GetLastModifiedTime(projectPath) : null;
154+
DateTime? lastUpdated = solutionLastUpdated > folderLastUpdated ? solutionLastUpdated : folderLastUpdated;
151155

152156
// get project version
153157
string projectVersion = folderExists ? Tools.GetProjectVersion(projectPath) : null;

0 commit comments

Comments
 (0)
Please sign in to comment.