feat: extension support (#78)

This commit is contained in:
Levi authored and GitHub committed 2023-10-16 09:47:31 +08:00
1 parent 82d316af83
commit c073fc0a67
118 files changed
+6971 -780

No files matched your search

+1 -2
View File
@@ -1,7 +1,6 @@
package controller
import (
"errors"
"os"
"path/filepath"
)
@@ -34,7 +33,7 @@ func (c *DefaultFileController) Touch(name string, size int64) (file *os.File, e
return
}
file, err = os.Create(name)
if err != nil && !errors.Is(err, os.ErrExist) {
if err != nil {
return
}
if size > 0 {