Skip to content

Commit

Permalink
[AKS] fix a bug in zip on windows (#20832)
Browse files Browse the repository at this point in the history
* [AKS] fix a bug in zip on windows

* update changelog

* update changelog
  • Loading branch information
YanaXu authored Feb 3, 2023
1 parent d2fbb74 commit fc2fa77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Aks/Aks/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release
* Fixed the issue that Invoke-AzAksRunCommand will fail when the directory for parameter CommandContextAttachment contains sub-directories. [#20734]
* Added parameter `-AadProfile` for `New-AzAksCluster` and `Set-AzAksCluster`
* Added parameter `-NodeHostGroupID` for `New-AzAksCluster` and parameter `-HostGroupID` for `New-AzAksNodePool`

Expand Down
2 changes: 1 addition & 1 deletion src/Aks/Aks/Commands/RunAzureRmAksCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ private string GetCommandContext()
{
foreach (string filepath in filesToAttach)
{
var relativePath = filepath.Replace(rootDirectory, "").Trim('/').Trim('\\');
var relativePath = filepath.Replace(rootDirectory, "").Replace('\\', '/').Trim('/');
var memoryZipFile = archive.CreateEntry(relativePath);
var fileContent = File.ReadAllText(filepath);
using (var entryStream = memoryZipFile.Open())
Expand Down

0 comments on commit fc2fa77

Please sign in to comment.