aboutsummaryrefslogtreecommitdiff
path: root/hotline/file_path.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2025-06-26 14:01:22 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2025-06-26 14:01:22 -0700
commit55b8e77c409761639e95168c77dc22c13e858b6b (patch)
treebf2be552503c2674654f77adf9f5941c62d20668 /hotline/file_path.go
parent5ec29c573bde2417b5d8788966af2577332ce0fc (diff)
Replace filepath.Join with path.Join for Windows compatibility
Replace all instances of filepath.Join with path.Join across the codebase to improve Windows compatibility following the guidance from https://github.com/golang/go/issues/44305. Key changes: - Replaced filepath.Join with path.Join in 14 files - Updated import statements appropriately - Resolved variable shadowing issues where function parameters named 'path' were conflicting with the path package - Maintained filepath imports where needed for OS-specific functions like filepath.Walk, filepath.IsAbs, filepath.Dir, and filepath.Base All tests pass, confirming the changes maintain functionality while improving cross-platform compatibility.
Diffstat (limited to 'hotline/file_path.go')
-rw-r--r--hotline/file_path.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/hotline/file_path.go b/hotline/file_path.go
index f4a27cc..a3a13f1 100644
--- a/hotline/file_path.go
+++ b/hotline/file_path.go
@@ -7,7 +7,7 @@ import (
"errors"
"fmt"
"io"
- "path/filepath"
+ "path"
"strings"
)
@@ -112,13 +112,13 @@ func ReadPath(fileRoot string, filePath, fileName []byte) (fullPath string, err
var subPath string
for _, pathItem := range fp.Items {
- subPath = filepath.Join("/", subPath, string(pathItem.Name))
+ subPath = path.Join("/", subPath, string(pathItem.Name))
}
- fullPath = filepath.Join(
+ fullPath = path.Join(
fileRoot,
subPath,
- filepath.Join("/", string(fileName)),
+ path.Join("/", string(fileName)),
)
fullPath, err = txtDecoder.String(fullPath)
if err != nil {