[wp-trac] [WordPress Trac] #57386: Add filter to WP_Upgrader::install_package for copy_dir()
WordPress Trac
noreply at wordpress.org
Sat Jan 7 06:11:56 UTC 2023
#57386: Add filter to WP_Upgrader::install_package for copy_dir()
-----------------------------+--------------------------
Reporter: afragen | Owner: (none)
Type: feature request | Status: reopened
Priority: normal | Milestone: 6.2
Component: Upgrade/Install | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses: performance
-----------------------------+--------------------------
Comment (by costdev):
Just adding some clarification on how the VirtualBox bug can be reproduced
based on my testing during the past year:
=== Short version
- Move `oldname` to another location.
- Move new version `newname` into place, renamed to `oldname`.
- Delete `oldname` from the other location. 🐞
=== Long version
**Directories**
{{{
/parent1/DirectoryA
/parent2/DirectoryB
/parent3/
}}}
**Moves**
- Move `DirectoryA` to `/parent3/DirectoryA`
- Move `DirectoryB` to `/parent1/DirectoryA`
**Moves Result**
{{{
/parent1/DirectoryA
/parent2/
/parent3/DirectoryA
}}}
**Delete**
- Delete files in `/parent3/DirectoryA`
**Expected Delete Result**
- `/parent1/DirectoryA` will be intact. ✅
- `/parent2/` will be empty. ✅
- `/parent3/` will be empty. ✅
**Actual Delete Result in VirtualBox**
- `/parent1/DirectoryA` will be partially deleted. ❌
- `/parent2/` will be empty. ✅
- `/parent3/DirectoryA` will be partially deleted. ❌
=== Notes
- The bug is ''likely'' to occur for a simple directory structure, but
will ''always'' occur with multiple nested directories and files.
- clearstatcache/opcache invalidation don't resolve the issue.
- Detection of VirtualBox would at least require system level command
execution. **''If''** `shell_exec/exec()` in Core is a non-starter, then
exploration into the reliability of detecting VirtualBox would also be a
non-starter.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57386#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list