Follow-up from "Impement directory upload support for Skynet": Ignore existing files
The following discussion from !4167 (merged) should be addressed:
-
@ro-tex started a discussion: Something else that came up:
when we try to pin an entire directory to skynet recursively (all files are individually pinned) the process may fail at any point. if this happens we error out and stop. that's fine but it leave some files pinned and some - not. if you want to try again you need to go and manually delete the pinned directory from under fs/var/skynet because if you just try again the process will fail with an error stating that some files already exist. that's not great as UX and I see two ways to fix it:
- ignore files that already exist (check hash)
- add a flag to overwrite all files that exist
- add a directory version of the unpin command that allows you to clean up after the fail and start the process again.
personally, I think that 1 + 3 is the best solution
taek: #1 (closed) i like the most
PJ: +1 on #1 (closed)
Edited by Ivaylo Novakov