mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-27 20:36:29 -04:00
Export sync.RootLength so clients may modify it at runtime
This commit is contained in:
+1
-1
@@ -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
@@ -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
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user