diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-08-04 00:31:06 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-08-04 00:31:06 -0700 |
| commit | f6a9ad8001c439e5751fa5488fe6106b185ba8eb (patch) | |
| tree | 6db2fe45f36a10fc400cdd9c2be3fbd49a63360d /weed/shell/command_remote_mount.go | |
| parent | 42969c9c6247117f99ece43194912cd098acceb0 (diff) | |
| download | seaweedfs-f6a9ad8001c439e5751fa5488fe6106b185ba8eb.tar.xz seaweedfs-f6a9ad8001c439e5751fa5488fe6106b185ba8eb.zip | |
fix tests
Diffstat (limited to 'weed/shell/command_remote_mount.go')
| -rw-r--r-- | weed/shell/command_remote_mount.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/weed/shell/command_remote_mount.go b/weed/shell/command_remote_mount.go index bd6b49050..55dfb42ca 100644 --- a/weed/shell/command_remote_mount.go +++ b/weed/shell/command_remote_mount.go @@ -130,17 +130,15 @@ func (c *commandRemoteMount) findRemoteStorageConfiguration(commandEnv *CommandE func (c *commandRemoteMount) pullMetadata(commandEnv *CommandEnv, writer io.Writer, dir string, nonEmpty bool, remoteConf *filer_pb.RemoteConf, remote *filer_pb.RemoteStorageLocation) error { // find existing directory, and ensure the directory is empty - var mountToDir *filer_pb.Entry err := commandEnv.WithFilerClient(func(client filer_pb.SeaweedFilerClient) error { parent, name := util.FullPath(dir).DirAndName() - resp, lookupErr := client.LookupDirectoryEntry(context.Background(), &filer_pb.LookupDirectoryEntryRequest{ + _, lookupErr := client.LookupDirectoryEntry(context.Background(), &filer_pb.LookupDirectoryEntryRequest{ Directory: parent, Name: name, }) if lookupErr != nil { return fmt.Errorf("lookup %s: %v", dir, lookupErr) } - mountToDir = resp.Entry mountToDirIsEmpty := true listErr := filer_pb.SeaweedList(client, dir, "", func(entry *filer_pb.Entry, isLast bool) error { |
