Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/c#/GeneralUpdate.Core/FileSystem/StorageManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
/// <summary>
/// Recursively read all files in the folder path.
/// </summary>
private IEnumerable<FileNode> ReadFileNode(string path, string rootPath = null)

Check warning on line 255 in src/c#/GeneralUpdate.Core/FileSystem/StorageManager.cs

View workflow job for this annotation

GitHub Actions / aot-verify

Cannot convert null literal to non-nullable reference type.

Check warning on line 255 in src/c#/GeneralUpdate.Core/FileSystem/StorageManager.cs

View workflow job for this annotation

GitHub Actions / build-and-test (ubuntu-latest)

Cannot convert null literal to non-nullable reference type.

Check warning on line 255 in src/c#/GeneralUpdate.Core/FileSystem/StorageManager.cs

View workflow job for this annotation

GitHub Actions / build-and-test (windows-latest)

Cannot convert null literal to non-nullable reference type.
{
var resultFiles = new List<FileNode>();
rootPath ??= path;
Expand Down Expand Up @@ -305,7 +305,11 @@

var dirs = Directory.GetDirectories(backupRoot)
.Select(d => new DirectoryInfo(d))
.OrderByDescending(d => d.CreationTime)
.OrderByDescending(d =>
{
var name = d.Name;
return Version.TryParse(name, out var v) ? v : new Version(0, 0);
})
Comment on lines +308 to +312
.Skip(keepVersions);

foreach (var dir in dirs)
Expand Down
Loading