Skip to content

Commit

Permalink
[change] importer
Browse files Browse the repository at this point in the history
  • Loading branch information
trheyi committed Nov 17, 2022
1 parent db34109 commit 67e4581
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions importer/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ func Open(name string) from.Source {
ext := strings.ToLower(strings.TrimPrefix(filepath.Ext(name), "."))
switch ext {
case "xlsx":
fullpath := name
if !strings.HasPrefix(fullpath, "/") {
fullpath = filepath.Join(xfs.Stor.Root, name)
}
// fullpath := name
fullpath := filepath.Join(xfs.Stor.Root, name)
// if !strings.HasPrefix(fullpath, "/") {
// fullpath = filepath.Join(xfs.Stor.Root, name)
// }
return xlsx.Open(fullpath)
}
exception.New("暂不支持: %s 文件导入", 400, ext).Throw()
Expand Down

0 comments on commit 67e4581

Please sign in to comment.