diff --git a/src/Foundatio.Storage.SshNet/Storage/SshNetFileStorage.cs b/src/Foundatio.Storage.SshNet/Storage/SshNetFileStorage.cs index ca27e1b..b176acc 100644 --- a/src/Foundatio.Storage.SshNet/Storage/SshNetFileStorage.cs +++ b/src/Foundatio.Storage.SshNet/Storage/SshNetFileStorage.cs @@ -195,10 +195,10 @@ public async Task DeleteFilesAsync(string searchPattern = null, Cancellatio EnsureClientConnected(); if (searchPattern == null) - return await DeleteDirectory(_client.WorkingDirectory, false, cancellationToken); + return await DeleteDirectoryAsync(_client.WorkingDirectory, false, cancellationToken); if (searchPattern.EndsWith("/*")) - return await DeleteDirectory(searchPattern[..^2], false, cancellationToken); + return await DeleteDirectoryAsync(searchPattern[..^2], false, cancellationToken); var files = await GetFileListAsync(searchPattern, cancellationToken: cancellationToken).AnyContext(); int count = 0; @@ -235,7 +235,7 @@ private void CreateDirectory(string path) { } } - private async Task DeleteDirectory(string path, bool includeSelf, CancellationToken cancellationToken = default) { + private async Task DeleteDirectoryAsync(string path, bool includeSelf, CancellationToken cancellationToken = default) { int count = 0; string directory = NormalizePath(path); @@ -246,7 +246,7 @@ private async Task DeleteDirectory(string path, bool includeSelf, Cancellat continue; if (file.IsDirectory) { - count += await DeleteDirectory(file.FullName, true); + count += await DeleteDirectoryAsync(file.FullName, true, cancellationToken); } else { _logger.LogTrace("Deleting file {Path}", file.FullName); await _client.DeleteFileAsync(file.FullName, cancellationToken).AnyContext();