iotdb icon indicating copy to clipboard operation
iotdb copied to clipboard

org.apache.commons.io.FileSystem.isLegalFileName(CharSequence candidate) method is unreasonable

Open laMastor opened this issue 1 year ago • 1 comments

Search before asking

  • [X] I searched in the issues and found nothing similar.

Motivation

FileSystem.isLegalFileName(CharSequence candidate) method, there is a verification logic : candidate.length() > maxFileNameLength. maxFileNameLength is string length. but when file name bytes exceed 255 will cause system errors. java.io.FileNotFoundException : File name too long.

Solution

maxFileNameLength verify file name bytes length

Alternatives

no

Are you willing to submit a PR?

  • [X] I'm willing to submit a PR!

laMastor avatar Jul 26 '24 03:07 laMastor

Hi, this is your first issue in IoTDB project. Thanks for your report. Welcome to join the community!

github-actions[bot] avatar Jul 26 '24 03:07 github-actions[bot]