Browse Source

checks disk file exist

pull/2747/head
Konstantin Lebedev 3 years ago
parent
commit
f53cff045f
  1. 5
      weed/storage/backend/disk_file.go

5
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) { 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 { func (df *DiskFile) Name() string {

Loading…
Cancel
Save