shithub: furgit

Download patch

ref: 344b30bca7306c3de55839cfccfb6201bd6a433c
parent: a96abc307995afc09f637c905807c0c5203ab874
author: Runxi Yu <me@runxiyu.org>
date: Fri Feb 20 23:20:07 EST 2026

objectstore/loose: Use filepath instead of path when joining OS paths

--- a/objectstore/loose/paths.go
+++ b/objectstore/loose/paths.go
@@ -5,7 +5,7 @@
 	"fmt"
 	"io/fs"
 	"os"
-	"path"
+	"path/filepath"
 
 	"codeberg.org/lindenii/furgit/objectid"
 	"codeberg.org/lindenii/furgit/objectstore"
@@ -17,7 +17,7 @@
 		return "", fmt.Errorf("objectstore/loose: object id algorithm mismatch: got %s want %s", id.Algorithm(), store.algo)
 	}
 	hex := id.String()
-	return path.Join(hex[:2], hex[2:]), nil
+	return filepath.Join(hex[:2], hex[2:]), nil
 }
 
 // openObject opens the loose object file for id.
--