diff --git a/weed/storage/backend/disk_file.go b/weed/storage/backend/disk_file.go index 3b42429cf..cd5207356 100644 --- a/weed/storage/backend/disk_file.go +++ b/weed/storage/backend/disk_file.go @@ -70,7 +70,10 @@ func (df *DiskFile) Close() error { } func (df *DiskFile) GetStat() (datSize int64, modTime time.Time, err error) { - return df.fileSize, df.modTime, nil + if df.File == nil { + err = os.ErrInvalid + } + return df.fileSize, df.modTime, err } func (df *DiskFile) Name() string {