1
mirror of https://github.com/rclone/rclone synced 2024-12-27 19:43:48 +01:00

crypt: fix Mkdir/Rmdir with a dir parameter - fixes rmdirs command

This commit is contained in:
Nick Craig-Wood 2016-12-06 15:13:29 +00:00
parent dd99a4b3dc
commit cb9f1eefd2

View File

@ -152,6 +152,20 @@ func (f *Fs) Hashes() fs.HashSet {
return fs.HashSet(fs.HashNone)
}
// Mkdir makes the directory (container, bucket)
//
// Shouldn't return an error if it already exists
func (f *Fs) Mkdir(dir string) error {
return f.Fs.Mkdir(f.cipher.EncryptDirName(dir))
}
// Rmdir removes the directory (container, bucket) if empty
//
// Return an error if it doesn't exist or isn't empty
func (f *Fs) Rmdir(dir string) error {
return f.Fs.Rmdir(f.cipher.EncryptDirName(dir))
}
// Purge all files in the root and the root directory
//
// Implement this if you have a way of deleting all the files