From 51066a187bb6cd0ebe2e0275d66b3645c4357d79 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Fri, 10 Jun 2022 09:42:53 +0800 Subject: [PATCH] =?UTF-8?q?:fire:=20=E5=88=A0=E9=99=A4=E5=86=97=E4=BD=99?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/import.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/kernel/model/import.go b/kernel/model/import.go index 61f3919bb..a5cfef20d 100644 --- a/kernel/model/import.go +++ b/kernel/model/import.go @@ -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 {