Skip to content

Commit 8334a14

Browse files
authored
support container name (#21720)
1 parent 72ba88d commit 8334a14

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Storage/Storage.Management/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Added "$blobchangefeed" to be a valid container name
2122

2223
## Version 5.6.0
2324
* Supported rename file and directory

src/Storage/Storage/Common/NameUtil.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public static void ValidateContainerName(string name)
7373
/// <returns>True for valid container name, otherwise return false</returns>
7474
public static bool IsValidContainerName(string containerName)
7575
{
76-
Regex regex = new Regex(@"^\$root$|^\$logs$|^\$web$|^[a-z0-9]([a-z0-9]|(?<=[a-z0-9])-(?=[a-z0-9])){2,62}$");
76+
Regex regex = new Regex(@"^\$root$|^\$logs$|^\$web$|^\$blobchangefeed$|^[a-z0-9]([a-z0-9]|(?<=[a-z0-9])-(?=[a-z0-9])){2,62}$");
7777
return regex.IsMatch(containerName);
7878
}
7979

@@ -89,8 +89,9 @@ public static bool IsValidContainerPrefix(string containerPrefix)
8989
string root = "$root";
9090
string logs = "$logs";
9191
string web = "$web";
92+
string blobchangefeed = "$blobchangefeed";
9293

93-
if (root.IndexOf(containerPrefix) == 0 || logs.IndexOf(containerPrefix) == 0 || web.IndexOf(containerPrefix) == 0)
94+
if (root.IndexOf(containerPrefix) == 0 || logs.IndexOf(containerPrefix) == 0 || web.IndexOf(containerPrefix) == 0 || blobchangefeed.IndexOf(containerPrefix) == 0)
9495
{
9596
return true;
9697
}

0 commit comments

Comments
 (0)