Differences
This shows you the differences between the selected revisions of the page.
2021-10-31 | 2021-11-05 | ||
$parentPath + "\" means that if $parentPath is "folder\" than $parentPath+"\" is "folder\\" which is not found by Replace thus is generated an unwanted tree like "FolderName\c:\fileName" (2.236.98.206) | old revision restored – the fix breaks other scenarios, final fix coming (martin) | ||
Line 124: | Line 124: | ||
foreach ($file in $files) | foreach ($file in $files) | ||
{ | { | ||
- | $entryName = $file.Replace(($parentPath), "") | + | $entryName = $file.Replace(($parentPath + "\"), "") |
Write-Host "Adding $entryName..." | Write-Host "Adding $entryName..." | ||
[System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile( | [System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile( |