Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync-SfItem deviations from sfcli.exe and additional bugs #52

Open
appleoddity opened this issue Nov 6, 2019 · 0 comments
Open

Sync-SfItem deviations from sfcli.exe and additional bugs #52

appleoddity opened this issue Nov 6, 2019 · 0 comments

Comments

@appleoddity
Copy link

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 wrong. I observed the following bugs/deviations and submitted a pull request from my personal branch where the probles are fixed. The following bugs were fixed in my branch, 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. Example: If the source on ShareFile was /Folder1/Folder2/Folder3 and -CreateRoot is used, then Sync-SfItem would create Folder2/Folder3 in the destination.
  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. Example: if the source on ShareFile was /Folder1/Folder2/Folder3 and -CreateRoot is NOT used, then Sync-SfItem would create Folder3 in the destination.
  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. Example: If the source is /Folder1/Folder2/Folder3 and -CreateRoot is used, then Sync-SfItem will create Folder3 in the destination, otherwise no folder is created in the destination and only files (and subfolders, if recursive is used) are copied.
  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. In this scenario, if someone used the -move switch and the source was /Folder1/Folder2/Folder3 and additionally there was a Folder4 subfolder, then Folder4 would be deleted if it was empty, even if -KeepFolders was used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant