-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
插入资源文件时文件名长度最大限制 189 字节 #7099
New issue
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
Comments
这是是不是应该对 ASCII 字符与非 ASCII 字符分别计算呢 |
是的,现在的实现有点粗暴。 |
那我今天找时间研究一下在合法字符之间根据字节长度进行切片的解决方案 |
不用了,我在改了,等会提交你 review 下。 |
88250
added a commit
that referenced
this issue
Jan 20, 2023
@Zuoqiu-Yingyi 已经提交 |
@88250 用了几个测试用例, 应该没啥问题 o( ̄▽ ̄)d |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
过长的资源文件名会导致同步后某些系统平台上迁出失败 #7097
大部分系统对于文件名最大长度支持都是 255 字节,但是由于编码方式不同,我们只能取较大编码算法进行计算(3 或 4 个字节),也就是 255-11(临时文件后缀)-23(id 部分)- 5 左右后缀 = 216 字节,216/3 = 72 字 或 216/4 = 54 字,由于大部分字都是 3 字节,所以取一个中间值大约是 63 字,63*3 = 189 字节
插入资源文件时,文件名长度大于 189 字节则自动删除过长的部分。已有文件不做处理。
The text was updated successfully, but these errors were encountered: