Skip to content

Commit 606520b

Browse files
committed
Fix the trailing slash of the domain of adls account
1 parent dd84cdd commit 606520b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/ResourceManager/DataLakeStore/Commands.DataLakeStore/ChangeLog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21-
21+
* Fix the trailing slash of the domain of adls account
2222
## Version 6.2.1
2323
* Update the DataLake package to 1.1.10.
2424
* Add default Concurrency to multithreaded operations.

src/ResourceManager/DataLakeStore/Commands.DataLakeStore/DataPlaneModels/AdlsClientFactory.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ private static string HandleAccntName(string accnt,IAzureContext context)
2424
{
2525
if (Regex.IsMatch(accnt, @"^[a-zA-Z0-9]+$"))
2626
{
27-
return $"{accnt}.{context.Environment.GetEndpoint(AzureEnvironment.Endpoint.AzureDataLakeStoreFileSystemEndpointSuffix)}";
27+
string domain = context.Environment.GetEndpoint(AzureEnvironment.Endpoint.AzureDataLakeStoreFileSystemEndpointSuffix);
28+
if (domain.EndsWith("/"))
29+
{
30+
domain = domain.Substring(0, domain.Length - 1);
31+
}
32+
33+
return $"{accnt}.{domain}";
2834
}
2935
return accnt;
3036
}

0 commit comments

Comments
 (0)