mirror of
https://github.com/rclone/rclone.git
synced 2025-06-25 14:22:55 +02:00
swift, s3, googlecloudstorage: Don't delete the container/bucket if fs wasn't at root - fixes #172
This commit is contained in:
@ -371,10 +371,13 @@ func (f *Fs) Mkdir() error {
|
||||
return f.c.ContainerCreate(f.container, nil)
|
||||
}
|
||||
|
||||
// Rmdir deletes the container
|
||||
// Rmdir deletes the container if the fs is at the root
|
||||
//
|
||||
// Returns an error if it isn't empty
|
||||
func (f *Fs) Rmdir() error {
|
||||
if f.root != "" {
|
||||
return nil
|
||||
}
|
||||
return f.c.ContainerDelete(f.container)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user