소스 검색

fixbug:盘符问题

master-opt
yuan_rh 4 년 전
부모
커밋
d6416377ed
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. +2
    -2
      handle/handle.go

+ 2
- 2
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


불러오는 중...
취소
저장