[wp-trac] [WordPress Trac] #54582: Problem with deleting old files at the end of a core update when the filesystem is case-insensitive

WordPress Trac noreply at wordpress.org
Mon Dec 6 00:21:38 UTC 2021


#54582: Problem with deleting old files at the end of a core update when the
filesystem is case-insensitive
---------------------------------------+---------------------
 Reporter:  pbiron                     |       Owner:  (none)
     Type:  defect (bug)               |      Status:  new
 Priority:  high                       |   Milestone:  5.9
Component:  Upgrade/Install            |     Version:
 Severity:  major                      |  Resolution:
 Keywords:  needs-patch needs-testing  |     Focuses:
---------------------------------------+---------------------

Comment (by pbiron):

 Replying to [comment:4 afragen]:
 > Forgive my ignorance but if a filesystem is case-insensitive wouldn't
 > {{{
 > $mixed_case_filename === $lower_case_filename
 > }}}

 Not necessarily.  Take MacOS, for example, which by default is case-
 insensitive by case-preserving.

 That is, if you do:

 {{{
 #!php
 touch( 'Foo.txt' );
 touch( 'foo.txt' );
 }}}

 There will only be 1 file on the filesystem (with filename `Foo.txt`).

 So, `strtolower( 'Foo.txt' ) === strtolower( 'foo.txt' )` doesn't tell you
 whether to filesystem is, in fact, case-insensitive :-)

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


More information about the wp-trac mailing list