#5931: Folder::delete fails if directory to delete contains symbolic links (to
directories)
----------------------------+-----------------------------------------------
    Reporter:  boulon       |         Owner:           
        Type:  Bug          |        Status:  reopened 
    Priority:  Low          |     Milestone:  1.2.x.x  
   Component:  File System  |       Version:  1.2 Final
    Severity:  Trivial      |    Resolution:           
    Keywords:               |   Php_version:  n/a      
Cake_version:  7945         |  
----------------------------+-----------------------------------------------
Changes (by boulon):

  * status:  closed => reopened
  * resolution:  needmoreinfo =>

Comment:

 Replying to [comment:1 gwoo]:
 > is there a reason to use the file class for this?

 Alternatives as calling proc_open("rm -rf") are not so safe and not OS
 agnostic.

 This trivia would not let *delete* follow symlink to directories (which
 could be outside origin directories).

 This would make the delete operation work in a broader range of cases.


 My case was lacking precision:

 The delete operation on a Folder fails (and tells it can't rmdir a non
 directory) when there is inside it symbolic link whose targets is a
 directory.

 If you work on a folder, and already have a Folder managing it, I think
 the logical way to delete it if you have to is calling Folder::delete and
 this operation should work.

 This could happen if you let users upload archives, you extract them in a
 tmp folder, do your work, then delete folder or part of it.

-- 
Ticket URL: <https://trac.cakephp.org/ticket/5931#comment:2>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tickets cakephp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to