Active
Project:
Plugin Manager
Version:
6.x-1.9
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Jan 2009 at 15:41 UTC
Updated:
20 Mar 2009 at 23:36 UTC
Jump to comment: Most recent
Before I installed the php ftp module, (so ftp_connect was not found, and ftp_plugin_manager_copy_wrapper() was used), installs worked OK, but updates did not seem to actually update. I noticed that one update created some new files, so guessed existing files were not being overwritten.
I added this to remove files before copying the new ones in ftp.backend.inc:
if (file_exists( $ftp_path/$file )) {
unlink( "$ftp_path/$file" );
}
above the
@copy($extract_dir . $file, "$ftp_path/$file");
in ftp_plugin_manager_copy_wrapper().
Upgrades then worked, but on my server the "file_exists" line cause division by zero errors, so this isn't a good solution.
Comments
Comment #1
Anonymous (not verified) commentedWe really should uninstall before try to reinstall. Thanks for point that out!
Comment #2
ozish commentedrallycivic,
Thank you for posting that code. You may find (as I did) that using "is_file" instead of "file_exists" will solve your problem:
Comment #3
Leeteq commentedSubscribing.