mirror of
https://github.com/schollz/croc.git
synced 2025-10-10 21:01:02 +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
|
||||
for _, r := range fname {
|
||||
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
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue