Core uses php's file_exists which does a case sensitive determination for if a file already exists and a new file thus needs a numerical suffix when adding a new file.
But filefield_file_download when querying the files table does a case insensitive query. (Same issue in upload's upload_file_download). As a result, I've got two files with case variation only in their filepath. I'm using content_permissions and private files (lol) to determine access to the files, but I get the wrong access for a file due to having another file with a different case and same path otherwise.
Patch is working for me. This may be an issue in HEAD as well, what do you think?
Comment | File | Size | Author |
---|---|---|---|
#1 | filefield_private_files_case.patch | 1.11 KB | quicksketch |
filefield-case.patch | 1.12 KB | Jody Lynn |
Comments
Comment #1
quicksketchThanks, yes I agree this is probably an issue with Drupal 7 also. I've applied a version of your patch, but generally I'd think if you're going to be using a case-sensitive file system you might benefit from using a case-sensitive database as well (like PostGres). All queries in MySQL are case-insensitive.