mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-21 15:56:10 +01:00
🔥 删除冗余代码
This commit is contained in:
parent
2ca33753e0
commit
51066a187b
1 changed files with 0 additions and 7 deletions
|
|
@ -350,7 +350,6 @@ func ImportFromLocalPath(boxID, localPath string, toPath string) (err error) {
|
|||
writingDataLock.Lock()
|
||||
defer writingDataLock.Unlock()
|
||||
|
||||
box := Conf.Box(boxID)
|
||||
var baseHPath, baseTargetPath, boxLocalPath string
|
||||
if "/" == toPath {
|
||||
baseHPath = "/"
|
||||
|
|
@ -367,12 +366,6 @@ func ImportFromLocalPath(boxID, localPath string, toPath string) (err error) {
|
|||
boxLocalPath = filepath.Join(util.DataDir, boxID)
|
||||
|
||||
if gulu.File.IsDir(localPath) {
|
||||
folderName := filepath.Base(localPath)
|
||||
p := path.Join(toPath, folderName)
|
||||
if box.Exist(p) {
|
||||
return errors.New(Conf.Language(1))
|
||||
}
|
||||
|
||||
// 收集所有资源文件
|
||||
assets := map[string]string{}
|
||||
filepath.Walk(localPath, func(currentPath string, info os.FileInfo, walkErr error) error {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue