diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-08-29 18:46:28 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-08-29 18:46:28 -0700 |
| commit | a31f2907f05bf7fea9a4e341eb3c6f44ca815cd1 (patch) | |
| tree | 6822fd2ccecbb58f6b64be84b5b88d250bdb8e57 /weed/command/filer_remote_sync.go | |
| parent | 001a472057f01b3ac2d3edb59b3d5fb0a141cddd (diff) | |
| download | seaweedfs-a31f2907f05bf7fea9a4e341eb3c6f44ca815cd1.tar.xz seaweedfs-a31f2907f05bf7fea9a4e341eb3c6f44ca815cd1.zip | |
cloud drive: filer.remote.sync supports remove folder
Diffstat (limited to 'weed/command/filer_remote_sync.go')
| -rw-r--r-- | weed/command/filer_remote_sync.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/command/filer_remote_sync.go b/weed/command/filer_remote_sync.go index 48713093e..8d2719660 100644 --- a/weed/command/filer_remote_sync.go +++ b/weed/command/filer_remote_sync.go @@ -164,6 +164,10 @@ func followUpdatesAndUploadToRemote(option *RemoteSyncOptions, filerSource *sour if message.OldEntry != nil && message.NewEntry == nil { glog.V(2).Infof("delete: %+v", resp) dest := toRemoteStorageLocation(util.FullPath(mountedDir), util.NewFullPath(resp.Directory, message.OldEntry.Name), remoteStorageMountLocation) + if message.OldEntry.IsDirectory { + glog.V(0).Infof("rmdir %s", remote_storage.FormatLocation(dest)) + return client.RemoveDirectory(dest) + } glog.V(0).Infof("delete %s", remote_storage.FormatLocation(dest)) return client.DeleteFile(dest) } |
