[wp-trac] [WordPress Trac] #28013: WP_Filesystem_FTPext::exists($filename) returns false when file exists on FTP Service ( IIS/6.0 Microsoft & Linux/vsftp )

WordPress Trac noreply at wordpress.org
Mon Mar 19 22:39:16 UTC 2018


#28013: WP_Filesystem_FTPext::exists($filename) returns false when file exists on
FTP Service ( IIS/6.0 Microsoft & Linux/vsftp )
----------------------------+-----------------------------
 Reporter:  joostdekeijzer  |       Owner:  dd32
     Type:  defect (bug)    |      Status:  reopened
 Priority:  normal          |   Milestone:  Future Release
Component:  Filesystem API  |     Version:  3.9.2
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:  administration
----------------------------+-----------------------------

Comment (by hnhn2):

 This is rather painful. Seeing this on several 4.9.4 installations (Linux
 vsftpd) and any plugin updates just bring the sites down!

 I don't understand two things
 [https://github.com/WordPress/WordPress/blob/master/wp-admin/includes
 /class-wp-upgrader.php#L830 here]:

 - Why at :839 bother with ```->exists($file)``` when at :837 there is no
 such extra care?
   If the call on a non-existent file has undesired consequences, why it's
 being handled in one case only? Yes, the call is returning an empty list
 in this case, but it also seems superfluous.

 - At :841 the call to ```$wp_filesystem->delete( $file );``` invokes RMDIR
 in vsftp, which fails.
   So regardless of the failing exists() call, this seems to be the main
 problem.
   Shouldn't there instead be ```$wp_filesystem->delete($file, false,
 'f');```?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28013#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list