[wp-trac] [WordPress Trac] #15134: WordPress should not try to remove theme's or plugin's directory recursively if the directory is a symlink

WordPress Trac noreply at wordpress.org
Fri Nov 18 11:21:49 UTC 2016


#15134: WordPress should not try to remove theme's or plugin's directory
recursively if the directory is a symlink
---------------------------------+------------------------------
 Reporter:  vladimir_kolesnikov  |       Owner:  dd32
     Type:  defect (bug)         |      Status:  reopened
 Priority:  normal               |   Milestone:  Awaiting Review
Component:  Upgrade/Install      |     Version:
 Severity:  normal               |  Resolution:
 Keywords:  has-patch            |     Focuses:
---------------------------------+------------------------------

Comment (by matcho):

 Allow me to support this argument and initiative.

 AFAIK no removal mechanism in the Unix world ever deletes the target of a
 symlink unless a specific option is given. While this behaviour might be
 discussed in the context of Wordpress, it is certainly not expected and
 might create unexpected large damage to the data.

 Note that I'm in a use case where a homemade plugin needs a symlink to
 point to some application / lib; I agree this is probably not the best way
 to achieve what I'm looking for but again, doing this should not lead to
 WP deleting my data.

 Thanks
 Mathias

 Replying to [comment:8 scribu]:
 > > OK, probably my use case is not good for this problem but I still
 think that WP should not follow symlinks when deleting directories because
 this can cause removal of the files the user is not expecting to have
 removed. And it just contradicts to Linux/UNIX tradition - if the
 plugin/theme/etc directory were removed with 'rm -r', 'rm' would not
 follow the link but would remove the symlink itself instead. Just my
 opinion.
 >
 > That makes sense, I guess.

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


More information about the wp-trac mailing list