union: the root folder shows the modtime configured by --default-time #6986

This commit is contained in:
Nick Craig-Wood 2023-05-03 10:45:48 +01:00
parent f7b87a8049
commit 6001f05a12

View File

@ -3,7 +3,6 @@ package policy
import ( import (
"context" "context"
"fmt" "fmt"
"math/rand"
"path" "path"
"strings" "strings"
"time" "time"
@ -109,9 +108,7 @@ func findEntry(ctx context.Context, f fs.Fs, remote string) fs.DirEntry {
if err != nil { if err != nil {
return nil return nil
} }
// random modtime for root return fs.NewDir("", time.Time{})
randomNow := time.Unix(time.Now().Unix()-rand.Int63n(10000), 0)
return fs.NewDir("", randomNow)
} }
found := false found := false
for _, e := range entries { for _, e := range entries {