[wp-trac] [WordPress Trac] #34976: Plug ins fail to update after WP 4.4 installed

WordPress Trac noreply at wordpress.org
Mon Dec 14 07:19:40 UTC 2015


#34976: Plug ins fail to update after WP 4.4 installed
----------------------------+--------------------
 Reporter:  patdundee       |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  4.4.1
Component:  Filesystem API  |     Version:  4.4
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+--------------------

Comment (by dd32):

 [attachment:34976.diff] is an untested attempt at supporting all these
 various FTP implementations.

 1. Attempt a `NLST` listing, if file exists in that list, Great! (This may
 also list hidden files under some FTP systems)
 2. If it's a hidden file:
   - attempt a `NLST -a` listing (4.4 behaviour)
   - attempt a `LIST -a` listing (4.3 behaviour)

 This means that for a hidden file that doesn't exist, there'll be 3 FTP
 operations, If it does exist, hopefully it'll be found sooner than later.
 I don't care about the extra FTP cycles in that case.

 [attachment:34976.2.diff] is slightly different ordering
 1. conditionally:
  - If hidden, perform a `NLST -a` (4.4ish behaviour)
  - If not hidden, perform a `NLST` (4.4ish behaviour)
 2. If hidden, perform a `LIST -a` (4.3 behaviour)
 3. If hidden, perform a `NLST`

 This makes the assumption that servers support `NLIST -a`, falling back to
 `LIST -a` and `NLIST` only when needed, however also not using `-a` unless
 it knows it's needed to, which means that the hidden branches only get hit
 once or twice, removing the need for caching the result.

 I'm leaning towards [attachment:34976.2.diff] as it should be the most
 performant and clear-cut option.

 Related to this, I just opened ​#35066 to rename the file, simply so we
 don't have to deal with FTP + hidden files again.

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


More information about the wp-trac mailing list