X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/7cd900d61edbd6d322db3cecb913adf574389320..f22acf38da970aa0d865a9978c9499dad01d235f:/hotline/file_path.go?ds=inline diff --git a/hotline/file_path.go b/hotline/file_path.go index cdd95b9..c8fe652 100644 --- a/hotline/file_path.go +++ b/hotline/file_path.go @@ -5,12 +5,10 @@ import ( "encoding/binary" "errors" "io" - "path" + "path/filepath" "strings" ) -const pathSeparator = "/" // File path separator TODO: make configurable to support Windows - // FilePathItem represents the file or directory portion of a delimited file path (e.g. foo and bar in "/foo/bar") // 00 00 // 09 @@ -84,7 +82,7 @@ func (fp *FilePath) String() string { out = append(out, string(i.Name)) } - return path.Join(out...) + return filepath.Join(out...) } func readPath(fileRoot string, filePath, fileName []byte) (fullPath string, err error) { @@ -95,11 +93,11 @@ func readPath(fileRoot string, filePath, fileName []byte) (fullPath string, err } } - fullPath = path.Join( + fullPath = filepath.Join( "/", fileRoot, fp.String(), - path.Join("/", string(fileName)), + filepath.Join("/", string(fileName)), ) return fullPath, nil