Posted by Jody Lynn on June 6, 2010 at 7:36pm
3 followers
| Project: | FileField |
| Version: | 6.x-3.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
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?
| Attachment | Size |
|---|---|
| filefield-case.patch | 1.12 KB |
Comments
#1
Thanks, 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.
#2
Automatically closed -- issue fixed for 2 weeks with no activity.