From d9fbbba5c3d51e3995c01e8ac994268415c7ec3d Mon Sep 17 00:00:00 2001 From: nielash Date: Tue, 9 Sep 2025 05:30:02 -0400 Subject: [PATCH] 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. --- fstest/fstest.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fstest/fstest.go b/fstest/fstest.go index e2a594011..a0205a1c9 100644 --- a/fstest/fstest.go +++ b/fstest/fstest.go @@ -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 {