checks disk file exist

This commit is contained in:
Konstantin Lebedev 2022-03-10 18:58:56 +05:00
parent 197ade6aeb
commit f53cff045f

View file

@ -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 {