Skip to content

Commit ca6c71e

Browse files
Ensure paths are prefixed with a slash, so the root URL is correctly removed
1 parent 5fb877d commit ca6c71e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Umbraco.StorageProviders.AzureBlob/IO/AzureBlobFileSystem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public IEnumerable<string> GetDirectories(string path)
100100

101101
return ListBlobs(path)
102102
.Where(x => x.IsPrefix)
103-
.Select(x => GetRelativePath(x.Prefix).TrimEnd('/'));
103+
.Select(x => GetRelativePath($"/{x.Prefix}").Trim('/'));
104104
}
105105

106106
/// <inheritdoc />
@@ -231,7 +231,7 @@ public IEnumerable<string> GetFiles(string path, string? filter)
231231
files = files.Where(x => x.IndexOf(filter, StringComparison.InvariantCultureIgnoreCase) > -1);
232232
}
233233

234-
return files.Select(GetRelativePath);
234+
return files.Select(x => GetRelativePath($"/{x}"));
235235
}
236236

237237
/// <inheritdoc />

0 commit comments

Comments
 (0)