fixed traversal constructing output paths correctly

This commit is contained in:
Daniel Fichtinger 2024-11-12 00:48:10 -05:00
parent c81985e79a
commit 005f011678
2 changed files with 3 additions and 2 deletions

View file

@ -36,11 +36,12 @@ func PathIsValid(path string, requireFile bool) bool {
func getRoot(path string) string {
for {
parent := filepath.Dir(path)
if parent == path {
if parent == "." {
break
}
path = parent
}
fmt.Println("getRoot: ", path)
return path
}