diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Shares/ShareService.cs | 7 | ||||
| -rw-r--r-- | src/slskd/Shares/SharedFileCache.cs | 18 |
2 files changed, 4 insertions, 21 deletions
diff --git a/src/slskd/Shares/ShareService.cs b/src/slskd/Shares/ShareService.cs index e99d048a..4505ea3e 100644 --- a/src/slskd/Shares/ShareService.cs +++ b/src/slskd/Shares/ShareService.cs @@ -150,10 +150,11 @@ namespace slskd.Shares /// <returns>The contents of the directory.</returns> public Task<Directory> ListDirectoryAsync(string directory) { - var list = Cache.List(directory.LocalizePath()); - var normalizedList = new Directory(list.Name.NormalizePathForSoulseek(), list.Files); + var localPath = directory.LocalizePath(); - return Task.FromResult(normalizedList); + var files = Repository.ListFiles(localPath); + + return Task.FromResult(new Directory(directory, files)); } /// <summary> diff --git a/src/slskd/Shares/SharedFileCache.cs b/src/slskd/Shares/SharedFileCache.cs index 190679a8..6e6cc6e6 100644 --- a/src/slskd/Shares/SharedFileCache.cs +++ b/src/slskd/Shares/SharedFileCache.cs @@ -51,13 +51,6 @@ namespace slskd.Shares Task FillAsync(IEnumerable<Share> shares, IEnumerable<Regex> filters); /// <summary> - /// Returns the contents of the specified <paramref name="directory"/>. - /// </summary> - /// <param name="directory">The directory for which the contents are to be listed.</param> - /// <returns>The contents of the directory.</returns> - Directory List(string directory); - - /// <summary> /// Substitutes the mask in the specified <paramref name="filename"/> with the original path, if the mask is tracked /// by the cache. /// </summary> @@ -380,17 +373,6 @@ namespace slskd.Shares } /// <summary> - /// Returns the contents of the specified <paramref name="directory"/>. - /// </summary> - /// <param name="directory">The directory for which the contents are to be listed.</param> - /// <returns>The contents of the directory.</returns> - public Directory List(string directory) - { - var files = Repository.ListFiles(directory); - return new Directory(directory, files); - } - - /// <summary> /// Substitutes the mask in the specified <paramref name="filename"/> with the original path, if the mask is tracked /// by the cache. /// </summary> |
