1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

fstest: fix slice bounds out of range error when using -remotes local

Before this change, TestIntegration/FsName could fail with "slice bounds out of
range [:-1]" when run with -remotes local.

It also caused issues with
'^TestGitAnnexFstestBackendCases$/^(TransferStorePathWithInteriorWhitespace|TransferStoreRelative)$'.

This change fixes the issue by accepting either "" or "local" to indicate the
local remote.
This commit is contained in:
nielash
2025-09-09 05:30:02 -04:00
parent fd87560388
commit d9fbbba5c3

View File

@@ -65,6 +65,9 @@ func Initialise() {
if envConfig := os.Getenv("RCLONE_CONFIG"); envConfig != "" {
_ = config.SetConfigPath(envConfig)
}
if *RemoteName == "local" {
*RemoteName = ""
}
configfile.Install()
accounting.Start(ctx)
if *Verbose {