Skip to content

Commit 62b5325

Browse files
committed
Get project last modified date from solution or folder date
Folder date isn't modified on bitlocker volumes
1 parent df43935 commit 62b5325

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)