mirror of
https://github.com/rclone/rclone.git
synced 2025-12-06 00:03:32 +00:00
operations: fix lsjson --encrypted when using --crypt-XXX parameters
Before this change an `rclone lsjson --encrypted` command where
additional `--crypt-` parameters were supplied on the command line:
rclone lsjson --crypt-description XXX --encrypted secret:
Produced an error like this:
Failed to lsjson: ListJSON failed to load config for crypt remote: config name contains invalid characters...
This was due to an incorrect lookup of the crypt config to create the
encrypted mapping.
Fixes #7833
This commit is contained in:
@@ -119,7 +119,7 @@ func newListJSON(ctx context.Context, fsrc fs.Fs, remote string, opt *ListJSONOp
|
|||||||
lj.dirs = false
|
lj.dirs = false
|
||||||
}
|
}
|
||||||
if opt.ShowEncrypted {
|
if opt.ShowEncrypted {
|
||||||
fsInfo, _, _, config, err := fs.ConfigFs(fsrc.Name() + ":" + fsrc.Root())
|
fsInfo, _, _, config, err := fs.ConfigFs(fs.ConfigStringFull(fsrc))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("ListJSON failed to load config for crypt remote: %w", err)
|
return nil, fmt.Errorf("ListJSON failed to load config for crypt remote: %w", err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user