feature[oss:tempdir] fixed persist object failed error in localoss implement

pull/187/head
Michael Li 2 years ago
parent fc60c4a5bc
commit 879e49d29a

@ -102,10 +102,7 @@ func (s *localossCreateTempDirServant) PutObject(objectKey string, reader io.Rea
func (s *localossCreateTempDirServant) PersistObject(objectKey string) error {
fi, err := os.Stat(s.savePath + objectKey)
if err != nil {
return err
}
if !fi.IsDir() {
if err == nil && !fi.IsDir() {
logrus.Debugf("object exist so do nothing objectKey: %s", objectKey)
return nil
}

Loading…
Cancel
Save