sbergwall / RobocopyPS

RobocopyPS
MIT License
51 stars 9 forks source link

Remove-RoboItem is not using created temporary folder #14

Closed fjollberg closed 2 years ago

fjollberg commented 2 years ago

https://github.com/sbergwall/RobocopyPS/blob/ca1653d37b632f0a52614e8cff79a99e18676e47/RobocopyPS/functions/Remove-RoboItem.ps1#L59

There is a bug here I believe, robocopy should mirror from created $tempDirectory to $Location. As the code is written currently it mirrors from $Location to $Location wich fails.

I believe $PSBoundParameters.Set_Item("Path", $location) should rather be:

$PSBoundParameters.Set_Item("Path", $tempDirectory)
sbergwall commented 2 years ago

This should be fixed in the dev branch with version 0.2.13.

fjollberg commented 2 years ago

Yes, this works fine now.