Re: Re: Another patch for PEAR/Command/Installer.php

From: Date: Sun, 21 Apr 2002 06:20:49 +0000
Subject: Re: Re: Another patch for PEAR/Command/Installer.php
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-5699@lists.php.net to get a copy of this message
FYI: I've applied the patch together with the baseinstalldir-patch for Installer.php. - Martin On 20 Apr 2002 19:28:45 +0200, Stig S. Bakken wrote: >It's kinda crude, but it works. I'll apply it, thanks. > > - Stig > >On Sat, 2002-04-20 at 17:25, Martin Jansen wrote: >> Today it's PEAR patching day :). The attached patch removes >> the directory that contained the code, if it's empty, when >> uninstalling a package. >> >> What do you think of this? >> >> - Martin >> >> -- >> Martin Jansen, <mail@martin-jansen.de> >> http://www.martin-jansen.de/ >> >> ---- >> > >> Index: Installer.php >> =================================================================== >> RCS file: /repository/php4/pear/PEAR/Installer.php,v >> retrieving revision 1.48 >> diff -u -r1.48 Installer.php >> --- Installer.php 13 Apr 2002 06:00:36 -0000 1.48 >> +++ Installer.php 20 Apr 2002 15:20:10 -0000 >> @@ -109,10 +109,10 @@ >> } >> foreach ($filelist as $file => $props) { >> $path = $props['installed_as']; >> - // XXX TODO: do a "rmdir -p dirname($path)" to maintain clean the fs >> if (!@unlink($path)) { >> $this->log(2, "unable to delete: $path"); >> } else { >> + @rmdir(dirname($path)); // Delete package directory if it's empty >> $this->log(2, "+ deleted file: $path"); >> } >> } >> -- Martin Jansen, <mail@martin-jansen.de> http://www.martin-jansen.de/

« previous php.pear.dev (#5699) next »