You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The +1 is not needed here because .Substring() is zero-indexed while Folder.Length is not. The additional slash before the filename is therefore already ignored.
Expected behavior
I'd expect the full filenames
Actual behavior
The first character of the filenames are removed (ome-file.pdf instead of some-file.pdf) when building the template.
Steps to reproduce behavior
Run the script on a folder
What is the version of the Cmdlet module you are running?
1.11, 2.x nightly
Which operating system/environment are you running PnP PowerShell on?
Windows
Linux
MacOS
Azure Cloud Shell
Azure Functions
Other : please specify
The text was updated successfully, but these errors were encountered:
Reporting an Issue or Missing Feature
When running New-PnPSitetemplateFromFolder, a template is generated with files.
Results in:
The first character of the filenames are removed (ome-file.pdf instead of some-file.pdf) when building the template.
The cause of this is the following line in
..\powershell\src\Commands\Provisioning\Site\NewSiteTemplateFromFolder.cs
:The +1 is not needed here because
.Substring()
is zero-indexed whileFolder.Length
is not. The additional slash before the filename is therefore already ignored.Expected behavior
I'd expect the full filenames
Actual behavior
The first character of the filenames are removed (ome-file.pdf instead of some-file.pdf) when building the template.
Steps to reproduce behavior
Run the script on a folder
What is the version of the Cmdlet module you are running?
1.11, 2.x nightly
Which operating system/environment are you running PnP PowerShell on?
The text was updated successfully, but these errors were encountered: