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

WordPress Trac noreply at wordpress.org
Thu Apr 24 15:33:57 UTC 2014


#28013: WP_Filesystem_FTPext::exists($filename) returns false when file exists on
IIS/6.0 Microsoft FTP Service
----------------------------+-----------------------------
 Reporter:  joostdekeijzer  |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Filesystem API  |    Version:  trunk
 Severity:  normal          |   Keywords:
  Focuses:  administration  |
----------------------------+-----------------------------
 I'm having trouble using the update/upgrade functions of WordPress on a
 Windows IIS/6.0 server.

 The .maintenance file is never deleted.

 I have to use the FTPext method of updating and I've found that
 `WP_Filesystem_FTPext::exists('.maintenance')` returns false even though
 the file exists.

 Since the fix for #10060 that function uses `ftp_nlist()` which returns
 invalid results on the IIS/6.0 Microsoft FTP Service.

 I did some more testing and it turns out that the current function has
 issues with "dotfiles"

 '''Work correctly'''
 `WP_Filesystem_FTPext::exists('index.php')`
 `WP_Filesystem_FTPext::exists('wp-content/debug.log')`

 '''Fail'''
 `WP_Filesystem_FTPext::exists('.maintenance')`
 `WP_Filesystem_FTPext::exists('wp-content/.maintenance')`

 (yes, I made sure those files actually existed ;-)

 For this particular purpose, couldend `WP_Upgrader::maintenance_mode()` be
 modified to test for the existence of .maintenance using `is_file( ABSPATH
 . $file )` and if so execute `$wp_filesystem->delete($file, false, 'f');`
 (setting the f bypases all the tests)?

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


More information about the wp-trac mailing list