diff options
Diffstat (limited to 'weed/shell/command_remote_mount.go')
| -rw-r--r-- | weed/shell/command_remote_mount.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/weed/shell/command_remote_mount.go b/weed/shell/command_remote_mount.go index d1b282d9c..3e92428d9 100644 --- a/weed/shell/command_remote_mount.go +++ b/weed/shell/command_remote_mount.go @@ -60,15 +60,17 @@ func (c *commandRemoteMount) Do(args []string, commandEnv *CommandEnv, writer io return err } - remoteStorageLocation := remote_storage.ParseLocation(*remote) - // find configuration for remote storage - // remotePath is /<bucket>/path/to/dir - remoteConf, err := c.findRemoteStorageConfiguration(commandEnv, writer, remoteStorageLocation) + remoteConf, err := filer.ReadRemoteStorageConf(commandEnv.option.GrpcDialOption, commandEnv.option.FilerAddress, remote_storage.ParseLocationName(*remote)) if err != nil { return fmt.Errorf("find configuration for %s: %v", *remote, err) } + remoteStorageLocation, err := remote_storage.ParseRemoteLocation(remoteConf.Type, *remote) + if err != nil { + return err + } + // sync metadata from remote if err = c.syncMetadata(commandEnv, writer, *dir, *nonEmpty, remoteConf, remoteStorageLocation); err != nil { return fmt.Errorf("pull metadata: %v", err) |
