Message-ID: <3626653F.2266F083@unb.ca> Date: Thu, 15 Oct 1998 18:12:32 -0300 From: Endlisnis X-Mailer: Mozilla 4.04 [en] (Win95; U) MIME-Version: 1.0 To: Eli Zaretskii CC: djgpp AT delorie DOT com Subject: Re: Uninstaller. References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Info: BrunNet, Inc. 800-278-6638 Reply-To: djgpp AT delorie DOT com Eli Zaretskii wrote: > On Wed, 14 Oct 1998, Endlisnis wrote: > > > mine, you get a list of application names (from the ver files). > > With rm, after to uninstall everything, you are left with a > > directory skeleton; mine gets rid of the directories as well. > > This is easy to do with `rm' as well: just add -r to the options: > rm -rvf @manifest/foo.mft > So if you really want to remove directories (I'm not sure this is so > important, btw), then you need to be smart about it. For example, > defer removing them until the very end, and if the directory isn't > empty, either ask the user or skip removing it (and possibly print a > suitable message). Well, this is how my program works: For each file in the manifest: 1) It deletes the file (using the 'remove' function, which I assume does not work on directories). 2) It tries to delete the directory using 'rmdir' function. 3) If the deleting of the directory succeeded (only works on empty directories), then move back one directory level and go to #2. So, mine will ignore any directory entries in the manifest file (it will actually say that it can't delete the 'file'). And it will remove any directories that become empty as a result of the uninstall. The one possible side-effect of this is if you had your DJGPP package installed in a directory structure like this: "C:\LANG" directory with only entry being the DJGPP directory. (C:\LANG\DJGPP\ is the installation path) then the LANG dir would be removed as a final act of completely uninstalling DJGPP (assuming that you had not added any new files, or none were created) -- (\/) Endlisnis (\/) s257m AT unb DOT ca Endlisnis AT GeoCities DOT com Endlisnis AT BrunNet DOT Net