From yazicivo at ttmail.com Wed Mar 19 13:54:18 2008 From: yazicivo at ttmail.com (Volkan YAZICI) Date: Wed, 19 Mar 2008 15:54:18 +0200 Subject: [rucksack-devel] (mapc #'delete-file ) Message-ID: <87hcf2om45.fsf@alamut.mobiliz.com.tr> Hi, In rucksack.lisp:517 it writes that: (:supersede ;; Remove all rucksack files from the directory. ;; DO: Only delete the files that Rucksack actually ;; uses. (mapc #'delete-file (directory (make-pathname :name :wild :type :wild :version :wild :defaults directory))) (apply #'make-instance class :directory directory args)) I tried some but couldn't figure out how to list files that Rucsack actually uses. And, IMHO, above snippet is quite buggy. (It costed me removing all files under the data directory I specified for Rucksack.) I'd be appreciated if anybody can fix it. Regards. From alemmens at xs4all.nl Mon Mar 31 19:00:19 2008 From: alemmens at xs4all.nl (Arthur Lemmens) Date: Mon, 31 Mar 2008 21:00:19 +0200 Subject: [rucksack-devel] (mapc #'delete-file ) In-Reply-To: <87hcf2om45.fsf@alamut.mobiliz.com.tr> References: <87hcf2om45.fsf@alamut.mobiliz.com.tr> Message-ID: Volkan YAZICI wrote: > In rucksack.lisp:517 it writes that: > > (:supersede > ;; Remove all rucksack files from the directory. > ;; DO: Only delete the files that Rucksack actually > ;; uses. > (mapc #'delete-file > (directory (make-pathname :name :wild > :type :wild > :version :wild > :defaults directory))) > (apply #'make-instance class :directory directory args)) > > I tried some but couldn't figure out how to list files that Rucsack > actually uses. I just added a function RUCKSACK-FILES-IN-DIRECTORY which gives a list with the files that Rucksack uses. At the moment that's only 4 files: "heap", "roots", "objects" and "schemas". > And, IMHO, above snippet is quite buggy. Yes, I agree. That's why I had the 'to do' note there. > (It costed me removing all files under the data directory I > specified for Rucksack.) Ouch. Sorry about that... I hadn't expected that people would put other files in the Rucksack directory. But I suppose that only shows my lack of imagination. > I'd be appreciated if anybody can fix it. I just rewrote this to delete only the files that are actually used and nothing else. The fix is in the CVS repository now. Thanks for the bug report, Arthur