File name lengths are counted in bytes

pull/162/head
M66B 5 years ago
parent 0d5a013301
commit 301e6c7a53

@ -114,8 +114,8 @@ public class EntityAttachment {
String filename = Long.toString(id);
if (!TextUtils.isEmpty(name))
filename += "." + Helper.sanitizeFilename(name);
if (filename.length() > 255)
filename = filename.substring(0, 255);
if (filename.length() > 127)
filename = filename.substring(0, 127);
return new File(dir, filename);
}

Loading…
Cancel
Save