mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
print bytes
This commit is contained in:
parent
4f1a6a8d4f
commit
8f226f72b6
1 changed files with 2 additions and 2 deletions
|
@ -575,11 +575,11 @@ func ValidFileName(fname string) (err error) {
|
||||||
// make sure it doesn't contain unicode or invisible characters
|
// make sure it doesn't contain unicode or invisible characters
|
||||||
for _, r := range fname {
|
for _, r := range fname {
|
||||||
if !unicode.IsGraphic(r) {
|
if !unicode.IsGraphic(r) {
|
||||||
err = fmt.Errorf("non-graphical unicode: %x U+%d in '%s'", string(r), r, fname)
|
err = fmt.Errorf("non-graphical unicode: %x U+%d in '%x'", string(r), r, fname)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !unicode.IsPrint(r) {
|
if !unicode.IsPrint(r) {
|
||||||
err = fmt.Errorf("non-printable unicode: %x U+%d in '%s'", string(r), r, fname)
|
err = fmt.Errorf("non-printable unicode: %x U+%d in '%x'", string(r), r, fname)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue