|
@@ -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) |
|
|
err =filepath.Walk(absolutePath, myWalkfunc) |
|
|
|
|
|
|
|
|
if err != nil { |
|
|
if err != nil { |
|
@@ -552,7 +552,7 @@ func myWalkfunc(path string, info os.FileInfo, err error) error { |
|
|
simpleFileInfo := new(simpleFileInfo) |
|
|
simpleFileInfo := new(simpleFileInfo) |
|
|
simpleFileInfo.Name=info.Name() |
|
|
simpleFileInfo.Name=info.Name() |
|
|
simpleFileInfo.Extension=filepath.Ext(path) |
|
|
simpleFileInfo.Extension=filepath.Ext(path) |
|
|
simpleFileInfo.RelativePath=filepath.Dir(strings.Replace(path,gobalRelativePath,"",1)) |
|
|
|
|
|
|
|
|
simpleFileInfo.RelativePath=strings.Replace(path,gobalRelativePath,"",1) |
|
|
simpleFileInfo.AbsolutePath=path |
|
|
simpleFileInfo.AbsolutePath=path |
|
|
gobalFolderFileMap[path]=simpleFileInfo |
|
|
gobalFolderFileMap[path]=simpleFileInfo |
|
|
return nil |
|
|
return nil |
|
|