mirror of
https://github.com/rclone/rclone.git
synced 2025-12-29 22:53:30 +00:00
This will enable rclone to manage directories properly in the future.
This commit is contained in:
10
s3/s3.go
10
s3/s3.go
@@ -627,7 +627,11 @@ func (f *Fs) dirExists() (bool, error) {
|
||||
}
|
||||
|
||||
// Mkdir creates the bucket if it doesn't exist
|
||||
func (f *Fs) Mkdir() error {
|
||||
func (f *Fs) Mkdir(dir string) error {
|
||||
// Can't create subdirs
|
||||
if dir != "" {
|
||||
return nil
|
||||
}
|
||||
exists, err := f.dirExists()
|
||||
if err != nil || exists {
|
||||
return err
|
||||
@@ -653,8 +657,8 @@ func (f *Fs) Mkdir() error {
|
||||
// Rmdir deletes the bucket if the fs is at the root
|
||||
//
|
||||
// Returns an error if it isn't empty
|
||||
func (f *Fs) Rmdir() error {
|
||||
if f.root != "" {
|
||||
func (f *Fs) Rmdir(dir string) error {
|
||||
if f.root != "" || dir != "" {
|
||||
return nil
|
||||
}
|
||||
req := s3.DeleteBucketInput{
|
||||
|
||||
Reference in New Issue
Block a user