Skip to content

Commit e05c55b

Browse files
committed
Fix for #102 GetFiles needs to return empty instead of null
1 parent 86b381c commit e05c55b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/UmbracoFileSystemProviders.Azure.Tests/AzureBlobFileSystemTestsBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ public void TestGetFilesInvalidPath()
365365
IEnumerable<string> actual = provider.GetFiles("/somethingmissing", "*.jpg");
366366

367367
// Assert
368-
Assert.IsNull(actual);
368+
Assert.IsEmpty(actual);
369369
}
370370

371371
/// <summary>

src/UmbracoFileSystemProviders.Azure/AzureFileSystem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ public IEnumerable<string> GetFiles(string path, string filter)
466466
if (!blobList.Any())
467467
{
468468
this.LogHelper.Error<AzureFileSystem>("Blob not found", new DirectoryNotFoundException($"Blob not found at '{path}'"));
469-
return null;
469+
return Enumerable.Empty<string>();
470470
}
471471

472472
return blobList.OfType<CloudBlockBlob>().Select(cd =>

0 commit comments

Comments
 (0)