소스 검색

:bug: 复制资源文件后导出父级文档再导入问题 Fix https://github.com/siyuan-note/siyuan/issues/5301

Liang Ding 3 년 전
부모
커밋
c2855cf469
1개의 변경된 파일0개의 추가작업 그리고 7개의 파일을 삭제
  1. 0 7
      kernel/model/export.go

+ 0 - 7
kernel/model/export.go

@@ -531,7 +531,6 @@ func exportMarkdownZip(boxID, baseFolderName string, docPaths []string) (zipPath
 		return
 		return
 	}
 	}
 
 
-	copiedAssets := hashset.New()
 	luteEngine := util.NewLute()
 	luteEngine := util.NewLute()
 	for _, p := range docPaths {
 	for _, p := range docPaths {
 		docIAL := box.docIAL(p)
 		docIAL := box.docIAL(p)
@@ -572,10 +571,6 @@ func exportMarkdownZip(boxID, baseFolderName string, docPaths []string) (zipPath
 				asset = asset[:strings.LastIndex(asset, "?")]
 				asset = asset[:strings.LastIndex(asset, "?")]
 			}
 			}
 
 
-			if copiedAssets.Contains(asset) {
-				continue
-			}
-
 			srcPath, err := GetAssetAbsPath(asset)
 			srcPath, err := GetAssetAbsPath(asset)
 			if nil != err {
 			if nil != err {
 				util.LogWarnf("get asset [%s] abs path failed: %s", asset, err)
 				util.LogWarnf("get asset [%s] abs path failed: %s", asset, err)
@@ -592,8 +587,6 @@ func exportMarkdownZip(boxID, baseFolderName string, docPaths []string) (zipPath
 				util.LogErrorf("copy asset from [%s] to [%s] failed: %s", srcPath, destPath, err)
 				util.LogErrorf("copy asset from [%s] to [%s] failed: %s", srcPath, destPath, err)
 				continue
 				continue
 			}
 			}
-
-			copiedAssets.Add(asset)
 		}
 		}
 	}
 	}