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
Folder Name ending with . would be created successfully without . at the end while reporting success without catching exception - leading to following reference to that folder failed
#168
Closed
amdishigh opened this issue
Dec 24, 2020
· 1 comment
· Fixed by #170
When movetofolder is enabled, and one of folder name to be created is with "." at end, the folder should be created without "." at end intendenly
Current Behavior
The folder would be created without "." at end un-inendenly, i.e. OS create it without "." for us without error, thus script believe it's created successfully - while actually it's not. Thus, following code while creating files within that folder, that would be failed
Steps to Reproduce (for bugs)
Your Environment
Module version used: 2.2.2
Operating System and PowerShell version: Windows / PowerShell 7.1
##Solution
One quick workaround is to trim "." at the end before we create it, below is what I added to fix it - but sure if any other code need such fix or any better solution.
In Set-JVMovie.ps1, before if ($Force -or $PSCmdlet.ShouldProcess($Path)) {
Add: $folderPath = $folderPath.TrimEnd(".")
The text was updated successfully, but these errors were encountered:
amdishigh
changed the title
Folder Name ending with . would be created successfully without . at the end while reporting catching exception - leading to following reference to that folder failed
Folder Name ending with . would be created successfully without . at the end while reporting success without catching exception - leading to following reference to that folder failed
Dec 24, 2020
Expected Behavior
When movetofolder is enabled, and one of folder name to be created is with "." at end, the folder should be created without "." at end intendenly
Current Behavior
The folder would be created without "." at end un-inendenly, i.e. OS create it without "." for us without error, thus script believe it's created successfully - while actually it's not. Thus, following code while creating files within that folder, that would be failed
Steps to Reproduce (for bugs)
Your Environment
##Solution
One quick workaround is to trim "." at the end before we create it, below is what I added to fix it - but sure if any other code need such fix or any better solution.
In Set-JVMovie.ps1, before if ($Force -or $PSCmdlet.ShouldProcess($Path)) {
Add: $folderPath = $folderPath.TrimEnd(".")
The text was updated successfully, but these errors were encountered: