vfs: avoid unnecessary subdir in cache path

Fixes #5316
This commit is contained in:
albertony 2021-05-08 14:46:48 +02:00
parent 326f3b35ff
commit 28e9fd45cc

View File

@ -1419,7 +1419,7 @@ func NewFs(ctx context.Context, path string) (Fs, error) {
extraConfig := overridden.String()
//Debugf(nil, "detected overriden config %q", extraConfig)
md5sumBinary := md5.Sum([]byte(extraConfig))
suffix := base64.RawStdEncoding.EncodeToString(md5sumBinary[:])
suffix := base64.RawURLEncoding.EncodeToString(md5sumBinary[:])
// 5 characters length is 5*6 = 30 bits of base64
const maxLength = 5
if len(suffix) > maxLength {