Export sync.RootLength so clients may modify it at runtime

This commit is contained in:
2025-03-18 21:44:14 -04:00
parent 17223758b1
commit 44924737ab
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -2,4 +2,4 @@ package sync
import "github.com/rwinkhart/libmutton/core"
var rootLength = len(core.EntryRoot) // length of core.EntryRoot string
var RootLength = len(core.EntryRoot) // length of core.EntryRoot string
+1 -1
View File
@@ -31,7 +31,7 @@ func WalkEntryDir() ([]string, []string) {
}
// trim root path from each path before storing
trimmedPath := fullPath[rootLength:]
trimmedPath := fullPath[RootLength:]
// append the path to the appropriate slice
if !entry.IsDir() {
+1 -1
View File
@@ -32,7 +32,7 @@ func WalkEntryDir() ([]string, []string) {
}
// trim root path from each path before storing and replace backslashes with forward slashes
trimmedPath := strings.ReplaceAll(fullPath[rootLength:], "\\", "/")
trimmedPath := strings.ReplaceAll(fullPath[RootLength:], "\\", "/")
// append the path to the appropriate slice
if !entry.IsDir() {