mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
Merge pull request #3872 from MichaelEischer/fuse-fix
mount: Only remember successful snapshot refreshes
This commit is contained in:
commit
7e96a5af62
@ -299,9 +299,8 @@ func (d *SnapshotsDirStructure) updateSnapshots(ctx context.Context) error {
|
||||
// sort snapshots ascending by time (default order is descending)
|
||||
sort.Sort(sort.Reverse(snapshots))
|
||||
|
||||
d.lastCheck = time.Now()
|
||||
|
||||
if d.snCount == len(snapshots) {
|
||||
d.lastCheck = time.Now()
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -310,8 +309,8 @@ func (d *SnapshotsDirStructure) updateSnapshots(ctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
d.lastCheck = time.Now()
|
||||
d.snCount = len(snapshots)
|
||||
|
||||
d.makeDirs(snapshots)
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user