From 44924737ab0830ad49e90c1d1930b05bba307284 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Tue, 18 Mar 2025 21:44:14 -0400 Subject: [PATCH] Export sync.RootLength so clients may modify it at runtime --- sync/1globals.go | 2 +- sync/commonUNIX.go | 2 +- sync/commonWIN.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sync/1globals.go b/sync/1globals.go index e6180b0..d6b9900 100644 --- a/sync/1globals.go +++ b/sync/1globals.go @@ -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 diff --git a/sync/commonUNIX.go b/sync/commonUNIX.go index b4f6cf4..cd8f019 100644 --- a/sync/commonUNIX.go +++ b/sync/commonUNIX.go @@ -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() { diff --git a/sync/commonWIN.go b/sync/commonWIN.go index 57f3a70..cf7fe25 100644 --- a/sync/commonWIN.go +++ b/sync/commonWIN.go @@ -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() {