In several places the module assumes that the public file with the name X is the same file as the private file with the name X.

So, if the status of the file changes, the existing public/private file is replaced.

There is no reason to assume that the 2 files are the same

So instead of
if( file_move($filepath, $private_path, FILE_EXISTS_REPLACE) ) {
rather use
if( file_move($filepath, $private_path, FILE_EXISTS_RENAME) ) {

(we lost numerous files because of this)

Comments

starbow’s picture

Assigned: Unassigned » starbow

this seems like a worthwhile change, but I will need to do some testing to see if there are any side effects.

acrollet’s picture

I have a patch to fix this on another issue: http://drupal.org/node/277692

it takes a little more than merely replacing REPLACE with RENAME...

cheers,

Adrian

jody lynn’s picture

Status: Active » Closed (duplicate)