Skip to content

Commit

Permalink
Remove Code Smell
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauro Cardillo committed Aug 2, 2023
1 parent db63a40 commit 0050fbd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/FileSystem.Adapters.Ftp/src/FtpAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,6 @@ public override async Task AppendFileAsync(string path, byte[] contents, Cancell

try
{
var stringContents = Encoding.UTF8.GetString(contents, 0, contents.Length);

await Task.Run(() =>
{
var file = client.OpenWrite(PrependRootPath(path));
Expand Down
6 changes: 4 additions & 2 deletions src/FileSystem.Adapters.Sftp/src/SftpAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,10 @@ public override async Task<IEnumerable<IFile>> GetFilesAsync(string path = "", C

try
{
var files = Enumerable.Empty<IFile>();

var task = Task.Run(() =>
{
var files = Enumerable.Empty<IFile>();
try
{
files = client.ListDirectory(path).Where(item => !item.IsDirectory).Select(ModelFactory.CreateFile).ToList();
Expand Down Expand Up @@ -162,9 +163,10 @@ public override async Task<IEnumerable<IDirectory>> GetDirectoriesAsync(string p

try
{
var directories = Enumerable.Empty<IDirectory>();

var task = Task.Run(() =>
{
var directories = Enumerable.Empty<IDirectory>();
try
{
directories = client.ListDirectory(path).Where(item => item.IsDirectory).Select(ModelFactory.CreateDirectory).ToList();
Expand Down

0 comments on commit 0050fbd

Please sign in to comment.