[wp-trac] [WordPress Trac] #36570: PHP Warning mkdir(): File exists only when I update the translations

WordPress Trac noreply at wordpress.org
Thu May 12 11:47:47 UTC 2016


#36570: PHP Warning mkdir(): File exists only when I update the translations
------------------------------------+------------------------------
 Reporter:  overclokk               |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  General                 |     Version:  4.5
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------------------
Changes (by tfrommen):

 * keywords:   => has-patch dev-feedback


Comment:

 The problem doesn't really lie with `WP_Filesystem_Direct::mkdir()`, but
 with what is fed into it.

 When unzipping a (translation pack) file, in addition to the original temp
 directory, for instance `wp-content/upgrade/de_DE-kMvYQt/`, the same
 directory with a full stop (pointing to the directory itself) is added.
 This is due to the fact that `dirname( 'some-file.ext' )` gives `'.'`.

 Please see the attached patch that fixes this behavior, and thus the
 `mkdir` warning.

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


More information about the wp-trac mailing list