1
mirror of https://github.com/rclone/rclone synced 2024-12-22 13:03:02 +01:00

local: fix incorrect conversion between integer types

This commit is contained in:
albertony 2024-08-15 20:23:57 +02:00
parent 1db8b20fbc
commit 7261f47bd2

View File

@ -72,12 +72,12 @@ func (o *Object) parseMetadataInt(m fs.Metadata, key string, base int) (result i
value, ok := m[key]
if ok {
var err error
result64, err := strconv.ParseInt(value, base, 64)
parsed, err := strconv.ParseInt(value, base, 0)
if err != nil {
fs.Debugf(o, "failed to parse metadata %s: %q: %v", key, value, err)
ok = false
}
result = int(result64)
result = int(parsed)
}
return result, ok
}