[wp-trac] [WordPress Trac] #36710: Symlinked directories should not be deleted recursively
WordPress Trac
noreply at wordpress.org
Fri Jun 14 00:43:13 UTC 2019
#36710: Symlinked directories should not be deleted recursively
------------------------------------+-----------------------------
Reporter: andy | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Filesystem API | Version:
Severity: major | Resolution:
Keywords: has-patch dev-feedback | Focuses: administration
------------------------------------+-----------------------------
Comment (by pbiron):
Replying to [comment:8 Otto42]:
> Replying to [comment:7 pbiron]:
> > I'm not seeing the described behavior of `is_writable()` returning
false for symlinks (PHP 7.1.24 on Windows 10).
>
> I know Windows has a symlink like mechanism, but I'm unfamiliar with it,
so maybe this needs to be tested on a linux box to be sure. PHP probably
doesn't have the exact same behaviors here.
Yeah. If someone has access to a linux box they can test the refreshed
patch on and it turns out it is needed in that case, I'll refresh again
and put that change back in.
@Dreamsorcerer A couple of other questions about the `is_writable()`
change: in trunk right now there are 2 calls to
`$wp_filesystem->is_writable()` and your patch only changed the 2nd one.
I'm not sure if the 1st one wasn't present when you created your patch or
not. Can you verify? [this is another reason I left that change out my
refresh...wasn't sure if both places needed the change or not].
If the change is really needed, wouldn't it be better to encapsulate it in
`WP_Filesystem_Direct::is_writable()` rather than in
`WP_Upgrader::clear_destination()`?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36710#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list