From: Sergey Matveev Date: Sun, 7 May 2023 19:15:03 +0000 (+0300) Subject: Newer ZFS has different octalize rule X-Git-Tag: v0.1.0^0 X-Git-Url: http://www.git.stargrave.org/?p=glocate.git;a=commitdiff_plain;h=512b4ec45c040338f9aea5c1e53783b817dfb85198b801eba892a452681f40b0 Newer ZFS has different octalize rule --- diff --git a/names.go b/names.go index c5a5809..707108b 100644 --- a/names.go +++ b/names.go @@ -95,12 +95,12 @@ func deoctalize(s string) string { chars := make([]byte, 0, len(s)) for i := 0; i < len(s); i++ { if s[i] == '\\' { - b, err := strconv.ParseUint("0"+s[i+1:i+1+3], 0, 8) + b, err := strconv.ParseUint(s[i+1:i+1+4], 0, 8) if err != nil { log.Fatalln(err) } chars = append(chars, byte(b)) - i += 3 + i += 4 } else { chars = append(chars, s[i]) }