🐛 File names ending with . will be considered as missing assets

🎨 Improve HTML clipping https://github.com/siyuan-note/siyuan/issues/13355
This commit is contained in:
Daniel 2024-12-04 22:37:22 +08:00
parent 821a58d895
commit 22190b532d
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
8 changed files with 36 additions and 25 deletions

View file

@ -128,7 +128,7 @@ func GetCardDavPathDepth(urlPath string) CardDavPathDepth {
func ParseAddressPath(addressPath string) (addressBookPath string, addressID string, err error) {
addressBookPath, addressFileName := path.Split(addressPath)
addressID = path.Base(addressFileName)
addressFileExt := path.Ext(addressFileName)
addressFileExt := util.Ext(addressFileName)
if GetCardDavPathDepth(addressBookPath) != cardDavPathDepth_AddressBook {
err = ErrorCardDavBookPathInvalid
@ -604,7 +604,7 @@ func (b *AddressBook) load() error {
for _, entry := range entries {
if !entry.IsDir() {
filename := entry.Name()
ext := path.Ext(filename)
ext := util.Ext(filename)
if ext == VCardFileExt {
wg.Add(1)
go func() {