We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cleanname
""
It's at line 50:
plan9port/src/lib9/cleanname.c
Line 50 in 61e362a
Unfortunately, I think this means the API has to change (to explicitly ignore or reject blank strings): blank strings can't be cleaned to ".".
The text was updated successfully, but these errors were encountered:
From cleanname(3):
The shortest string cleanname can return is two bytes: the null-terminated string ".". Therefore filename must contain room for at least two bytes.
So probably just check if name is nil or name[0] is '\0' at the start and return nil if so.
name
nil
name[0]
'\0'
Line 14 in 61e362a
Sorry, something went wrong.
No branches or pull requests
It's at line 50:
plan9port/src/lib9/cleanname.c
Line 50 in 61e362a
Unfortunately, I think this means the API has to change (to explicitly ignore or reject blank strings): blank strings can't be cleaned to ".".
The text was updated successfully, but these errors were encountered: