It is not transport third argument $replace into file_unmanaged_copy function. Therefore creates new file in files directory every time this function executed with FILE_EXISTS_REPLACE replace option.
Patch attached

Comments

quicksketch’s picture

Status: Needs review » Fixed

Thanks, good catch.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.