facultyai / faculty-sync

Synchronise a local directory with your Faculty platform workspace
https://pypi.org/project/faculty_sync/
Apache License 2.0
10 stars 1 forks source link

Disallow syncing home directory or root directory #33

Closed srstevenson closed 5 years ago

srstevenson commented 5 years ago

This is a first step towards resolving #7.

janfreyberg commented 5 years ago

Is this what we want to do? I think I personally would prefer implementing a general "warning" screen that informs the user of the danger of their action and allows them to say yes or no. This would allow us to then check things such as the amount of files that get deleted on sync down, etc.

Obviously, the root directory should throw an error as this does – but I could imagine some scenarios for the home directory to be a valid sync target, even if it's just once to get your dotfiles synced up.

srstevenson commented 5 years ago

I disagree that the home directory is a local directory that should be permitted: sml-sync doesn't currently provide a way to select a subset of local directory contents to be synchronised, so there's no way to upload your dotfiles with sml-sync --local $HOME without also synchronising the other contents of your home directory. This will typically include files which shouldn't leave your local machine, such as private keys in ~/.gnupg and ~/.ssh, as well as large amounts of data orthogonal to SherlockML usage, such as ~/Music.

janfreyberg commented 5 years ago

Those are good points, agreed