Skip to content

Commit 1e545c7

Browse files
committed
Merge branch 'develop'
2 parents ab24e97 + e05c55b commit 1e545c7

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
os: Visual Studio 2017
22

33
# Version format
4-
version: 1.0.1.{build}
4+
version: 1.0.2.{build}
55

66
cache:
77
- src\packages -> **\packages.config # preserve "packages" directory in the root of build folder but will reset it if packages.config is modified

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: 4 additions & 2 deletions
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 =>
@@ -694,6 +694,8 @@ private string FixPath(string path)
694694
return string.Empty;
695695
}
696696

697+
path = path.Replace("\\", Delimiter);
698+
697699
string appVirtualPath = this.ApplicationVirtualPath;
698700
if (appVirtualPath != null && path.StartsWith(appVirtualPath))
699701
{
@@ -728,7 +730,7 @@ private string FixPath(string path)
728730
path = path.Substring(1);
729731
}
730732

731-
return path.Replace("\\", Delimiter).TrimStart(Delimiter.ToCharArray()).TrimEnd(Delimiter.ToCharArray());
733+
return path.TrimStart(Delimiter.ToCharArray()).TrimEnd(Delimiter.ToCharArray());
732734
}
733735
}
734736
}

0 commit comments

Comments
 (0)