[MacPorts] #42047: proc delete should not complain if file does not exist
#42047: proc delete should not complain if file does not exist --------------------------+----------------------------- Reporter: ryandesign@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: MacPorts Future Component: base | Version: 2.2.1 Keywords: | Port: --------------------------+----------------------------- The documentation for [http://wiki.tcl.tk/10058 Tcl's "file delete"] says "Trying to delete a non-existent file is not considered an error." MacPorts' "delete" is supposed to be a smarter "file delete", but it does consider attempting to delete a non-existent file to be an error. This was not always the case. Originally, proc delete was implemented in r18144 using `rm -rf` (which does not complain about non-existent items) because it was faster and more reliable than using "file delete". In r22007 it was rewritten to use Tcl code, traversing each directory and deleting each file individually. The comment was rewritten to specify that "file delete" doesn't handle deleting directories properly until Tiger. In r24435 it was reimplemented using proc fs-traverse, but there was no preceding check for whether the item being deleted is a directory or if it even exists. fs-traverse quite rightly complains when asked to traverse a non-existent directory. Now that MacPorts base has for years already required at least Tiger, we can remove all the code and make it simply call "file delete -force" directly. -- Ticket URL: <https://trac.macports.org/ticket/42047> MacPorts <http://www.macports.org/> Ports system for OS X
#42047: proc delete should not complain if file does not exist ---------------------------+----------------------------- Reporter: ryandesign@… | Owner: ryandesign@… Type: defect | Status: closed Priority: Normal | Milestone: MacPorts Future Component: base | Version: 2.2.1 Resolution: fixed | Keywords: Port: | ---------------------------+----------------------------- Changes (by ryandesign@…): * status: new => closed * resolution: => fixed Comment: r115640 -- Ticket URL: <https://trac.macports.org/ticket/42047#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#42047: proc delete should not complain if file does not exist ---------------------------+---------------------------- Reporter: ryandesign@… | Owner: ryandesign@… Type: defect | Status: closed Priority: Normal | Milestone: MacPorts 2.3.0 Component: base | Version: 2.2.1 Resolution: fixed | Keywords: Port: | ---------------------------+---------------------------- Changes (by jmr@…): * milestone: MacPorts Future => MacPorts 2.3.0 -- Ticket URL: <https://trac.macports.org/ticket/42047#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts