TheDiscordian / ipfs-sync

A simple daemon which will watch files on your filesystem, mirror them to MFS, automatically update related pins, and update related IPNS keys.
BSD 3-Clause "New" or "Revised" License
95 stars 14 forks source link

Do less `files/rm` calls #28

Closed TheDiscordian closed 3 years ago

TheDiscordian commented 3 years ago

Currently when adding a directory files/rm is called for every file, in-case there's an overwrite. Instead we can just call files/rm -r once on the directory, which would ensure there'd be no collisions anyways.

This would cut down the HTTP calls done on large directories significantly.

TheDiscordian commented 3 years ago

Should probably check if the directory is empty before we remove it.