[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
Sun Dec 5 23:30:01 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:2 pbiron]:
> My thought with comparing the `Inodes` is that is more foolproof than
doing something like a `glob()` and counting the number of results
returned...but I could certainly overthinking it. Would love feedback on
that.
@wojsmol has pointed me to how [https://github.com/joomla/joomla-
cms/blob/bb5368c7ef9c20270e6e9fcc4b364cd0849082a5/administrator/components/com_admin/script.php#L8158
Joomla deals with case-insensitivity].
I note that they also compare inodes. I've updated
`is_filesystem_case_insenstive()` to use
[https://www.php.net/manual/en/function.fileinode fileinode()] instead of
calling `stat` to get the inode like Joomla does...I didn't know
`fileinode()` function existed in PHP :-)
Not being familiar with Joomla, I'll have to take a while to look over
their code in more detail to see if there is anything else we can "borrow"
from it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54582#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list