Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 2.1
-
Fix Version/s: 2.2.0
-
Component/s: Core CiviCRM
-
Labels:None
Description
CRM_Utils_File::makeFileName() implicitly truncates filenames to 63 chars + the extension. Since the filename includes a 32 char hash any file with an original name longer than 31 chars has the hash truncated. It is then not properly removed upon download and thus there are extra alphanumeric chars from the partial hash. The maximum length of a filename for all modern filesystems is 255 chars. This patch truncates at 240 instead of 63 to give a bit of room for the extension.