mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
🎨 Improve assets path calc https://github.com/siyuan-note/siyuan/issues/14011
This commit is contained in:
parent
e5867b0c2e
commit
737c3f6559
1 changed files with 1 additions and 3 deletions
|
|
@ -20,7 +20,6 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
|
||||||
"io/fs"
|
"io/fs"
|
||||||
"mime"
|
"mime"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
@ -379,7 +378,7 @@ func GetAssetAbsPath(relativePath string) (ret string, err error) {
|
||||||
if p := filepath.ToSlash(path); strings.HasSuffix(p, relativePath) {
|
if p := filepath.ToSlash(path); strings.HasSuffix(p, relativePath) {
|
||||||
if gulu.File.IsExist(path) {
|
if gulu.File.IsExist(path) {
|
||||||
ret = path
|
ret = path
|
||||||
return io.EOF
|
return fs.SkipAll
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
@ -393,7 +392,6 @@ func GetAssetAbsPath(relativePath string) (ret string, err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return "", errors.New(fmt.Sprintf(Conf.Language(12), relativePath))
|
return "", errors.New(fmt.Sprintf(Conf.Language(12), relativePath))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue