aboutsummaryrefslogtreecommitdiff
path: root/hotline/file_path.go
diff options
context:
space:
mode:
Diffstat (limited to 'hotline/file_path.go')
-rw-r--r--hotline/file_path.go10
1 files changed, 4 insertions, 6 deletions
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