mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
a038421e73
commit
97232090fe
1 changed files with 8 additions and 0 deletions
|
|
@ -262,6 +262,14 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
|
|||
if d == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if ".json" == d.Name() { // https://github.com/siyuan-note/siyuan/issues/16637
|
||||
if removeErr := os.RemoveAll(path); nil != removeErr {
|
||||
logging.LogErrorf("remove empty av file [%s] failed: %s", path, removeErr)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
if !strings.HasSuffix(path, ".json") || !ast.IsNodeIDPattern(strings.TrimSuffix(d.Name(), ".json")) {
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue