overview: fix "internal error: no overview data found" on 32 bit architectures - fixes #9723

The precision field in the backend overview YAML files can hold
fs.ModTimeNotSupported (100 years in nanoseconds) which overflows int
on 32 bit platforms, making the YAML for those backends fail to parse
and causing rclone to log 18 internal errors on every invocation.

Use int64 for the precision field and add a test that parses every
embedded backend YAML file so this is caught on 32 bit test runs.
This commit is contained in:
Nick Craig-Wood committed 2026-08-04 19:29:21 +01:00
1 parent a06df7a2de
commit 5629f2668c
2 files changed
+17 -1

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@ type BackendConfig struct {
Remote string `yaml:"remote"`
Features []string `yaml:"features"`
Hashes []string `yaml:"hashes"`
Precision int `yaml:"precision"`
Precision int64 `yaml:"precision"`
}
// GetBackendConfig from docs/data/backends
+16
View File
@@ -1,8 +1,10 @@
package overview
import (
"strings"
"testing"
"github.com/rclone/rclone/docs/data/backends"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -53,3 +55,17 @@ func TestGetBackendConfig(t *testing.T) {
assert.Equal(t, expectedMemoryConfig, conf, "parsed memory.yaml should match")
}
// Check every embedded backend YAML file parses on all architectures
func TestGetBackendConfigAll(t *testing.T) {
entries, err := backends.BackendFS.ReadDir(".")
require.NoError(t, err)
require.NotEmpty(t, entries)
for _, entry := range entries {
name := strings.TrimSuffix(entry.Name(), ".yaml")
conf, err := GetBackendConfig(name)
assert.NoError(t, err, "failed to load %s", entry.Name())
assert.NotNil(t, conf)
}
}