bugfix: updatedAt timestamp file may be empty

Signed-off-by: Michael Wan <zirenwan@gmail.com>
This commit is contained in:
Michael Wan
2018-08-29 07:32:01 -04:00
parent 93d3f065ac
commit 92243ff72a
5 changed files with 32 additions and 6 deletions

View File

@@ -168,7 +168,7 @@ func (o *snapshotter) Usage(ctx context.Context, key string) (snapshots.Usage, e
upperPath := o.upperPath(id)
if info.Kind == snapshots.KindActive {
du, err := fs.DiskUsage(upperPath)
du, err := fs.DiskUsage(ctx, upperPath)
if err != nil {
// TODO(stevvooe): Consider not reporting an error in this case.
return snapshots.Usage{}, err
@@ -225,7 +225,7 @@ func (o *snapshotter) Commit(ctx context.Context, name, key string, opts ...snap
return err
}
usage, err := fs.DiskUsage(o.upperPath(id))
usage, err := fs.DiskUsage(ctx, o.upperPath(id))
if err != nil {
return err
}