Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed `New-PnPSite` cmdlet to work with non-commercial cloud environments.
- Fixed `Set-PnPSearchSettings` cmdlet not working with vanity domain tenants [#2884](https://github.com/pnp/powershell/pull/2884)
- Fixed `Add-PnPFieldFromXml` cmdlet. It will now return the correct typed field if the added field was of type `Taxonomy`. [#2926](https://github.com/pnp/powershell/pull/2926)
- Fixed `New-PnPSitetemplateFromFolder` removing the first character of filenames [#2944](https://github.com/pnp/powershell/pull/2944)

### Contributors
- [enthusol]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ private string GetFiles(XMLPnPSchemaVersion schema, string folder, string ctid)
var fileInfo = dirInfo.GetFiles(Match);
foreach (var file in fileInfo.Where(f => (f.Attributes & FileAttributes.Hidden) == 0))
{
var unrootedPath = file.FullName.Substring(Folder.Length + 1);
var unrootedPath = file.FullName.Substring(Folder.Length);
var targetFolder = Path.Combine(TargetFolder, unrootedPath.LastIndexOf("\\") > -1 ? unrootedPath.Substring(0, unrootedPath.LastIndexOf("\\")) : "");
targetFolder = targetFolder.Replace('\\', '/');
var modelFile = new PnP.Framework.Provisioning.Model.File()
Expand Down