From d6416377eda13a56e3232be64583b9d87803e246 Mon Sep 17 00:00:00 2001 From: yuan_rh <545873205@qq.com> Date: Tue, 24 Nov 2020 11:19:46 +0800 Subject: [PATCH] =?UTF-8?q?fixbug:=E7=9B=98=E7=AC=A6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handle/handle.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handle/handle.go b/handle/handle.go index 6205b1b..684b78d 100644 --- a/handle/handle.go +++ b/handle/handle.go @@ -525,7 +525,7 @@ func GetFolderFileInfo(conn *websocket.Conn,absolutePath string) error{ } //文件目录处理 - gobalRelativePath = filepath.Dir(absolutePath)+"\\" + gobalRelativePath = filepath.Dir(absolutePath) err =filepath.Walk(absolutePath, myWalkfunc) if err != nil { @@ -552,7 +552,7 @@ func myWalkfunc(path string, info os.FileInfo, err error) error { simpleFileInfo := new(simpleFileInfo) simpleFileInfo.Name=info.Name() simpleFileInfo.Extension=filepath.Ext(path) - simpleFileInfo.RelativePath=filepath.Dir(strings.Replace(path,gobalRelativePath,"",1)) + simpleFileInfo.RelativePath=strings.Replace(path,gobalRelativePath,"",1) simpleFileInfo.AbsolutePath=path gobalFolderFileMap[path]=simpleFileInfo return nil