ShareFile-PowerShell icon indicating copy to clipboard operation
ShareFile-PowerShell copied to clipboard

Several bug fixes on Sync-SfItem

Open appleoddity opened this issue 6 years ago • 0 comments

The download behavior (and upload behavior) contains several bugs and deviations from sfcli.exe. Sync-SfItem does NOT work like sfcli.exe, the documentation claiming so is all wrong. The following bugs were fixed in this patch, but apply only to downloads. The same faulty logic problems exist in the upload routines and have not been touched.

  1. If 'Move' or 'Synchronize' is used, 'recursive' is no longer forced. This was a deviation from sfcli.exe
  2. When 'CreateRoot' is used and the source is a ShareFile folder, Sync-SfItem would create the parent of the source folder in the destination. This was a deviation from sfcli.exe.
  3. When 'CreateRoot' is not used, Sync-SfItem will still create the parent folder of the items being synchronized in the destination. This was a deviation from sfcli.exe.
  4. When 'CreateRoot' is used, Sync-SfItem will now behave in one of two ways. If the source is only files, then the parent of those files will be created in the destination. If the source is a folder, the folder will be created in the destination. Otherwise, if 'CreateRoot' is not used, the parent folder is not created at all in the destination.
  5. When 'Move' is used, folders would be deleted even when 'KeepFolders' was used if the folder did not have any child items. This was a bug, and a deviation from sfcli.exe.

appleoddity avatar Nov 06 '19 16:11 appleoddity