Skip to content

Commit

Permalink
bugfix custom path error
Browse files Browse the repository at this point in the history
  • Loading branch information
sjqzhang committed Dec 19, 2019
1 parent eb666f5 commit c578c92
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions fileserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -3978,11 +3978,17 @@ func (this *Server) initTus() {
continue
}
}
fpath = STORE_DIR_NAME + "/" + Config().DefaultScene + fpath + Config().PeerId
os.MkdirAll(DOCKER_DIR+fpath, 0775)
fpath2 := ""
fpath2 = STORE_DIR_NAME + "/" + Config().DefaultScene + fpath + Config().PeerId
if pathCustom != "" {
fpath2 = STORE_DIR_NAME + "/" + Config().DefaultScene + fpath
fpath2 = strings.TrimRight(fpath2, "/")
}

os.MkdirAll(DOCKER_DIR+fpath2, 0775)
fileInfo := &FileInfo{
Name: name,
Path: fpath,
Path: fpath2,
ReName: filename,
Size: info.Size,
TimeStamp: timeStamp,
Expand Down

0 comments on commit c578c92

Please sign in to comment.