New: Ensure folders are sorted alphabetically when importing

Closes #294
pull/4/head
Mark McDowall 8 years ago
parent ef044f1ff5
commit 10264a5bfb

@ -160,7 +160,7 @@ namespace NzbDrone.Core.RootFolders
results.RemoveAll(x => setToRemove.Contains(new DirectoryInfo(x.Path.ToLowerInvariant()).Name)); results.RemoveAll(x => setToRemove.Contains(new DirectoryInfo(x.Path.ToLowerInvariant()).Name));
_logger.Debug("{0} unmapped folders detected.", results.Count); _logger.Debug("{0} unmapped folders detected.", results.Count);
return results; return results.OrderBy(u => u.Name, StringComparer.InvariantCultureIgnoreCase).ToList();
} }
public RootFolder Get(int id) public RootFolder Get(int id)

Loading…
Cancel
Save