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
Comment #1
starbow commentedthis seems like a worthwhile change, but I will need to do some testing to see if there are any side effects.
Comment #2
acrollet commentedI 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
Comment #3
jody lynnDuplicate of #277692: Private upload automatically replaces files instead of renaming them