Closed (won't fix)
Project:
FileField
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Aug 2008 at 19:09 UTC
Updated:
4 Feb 2009 at 03:07 UTC
This issue is with a potential of won't fix, however:
{files} isn't indexed in 'filepath' so there is a chance of duplicate records.
function filefield_file_download($file) {
$file = file_create_path($file);
$result = db_query("SELECT * FROM {files} WHERE filepath = '%s'", $file);
if (!$file = db_fetch_object($result)) {
// We don't really care about this file.
return;
}
The code only checks the first fid, which might result with a 404 on a legal file.
Comments
Comment #1
dopry commentedhai... this was a result of you field_file_save_file / replace issue... There shouldn't ever be two files in the DB with the same path. that makes this a non issue as the state is undefined.