On Thu, Mar 20, 2003, Ralf S. Engelschall wrote: > On Wed, Mar 19, 2003, Thomas Lotterer wrote: > > > effect a compromise between error and create for nonexisting packages: > > create on enter, cleanup on leave if empty > > I would be even more radical: remove all files there which are older > than 1 day. It's a temporary area while working with packages. Anything > older than 1 day can be safely removed IMHO. > This would require some find/rm combination and that's in fact what i started with. However, after some testing i found no portable, safe and fool-proof way to detect if a directory is empty or contains just junk and the path does not point to some dangerous (errornous) directory like '/' so i went back a step and replaced a still unsafe screen-sized code snipped with a single "rmdir" line.
Deleting files is probably too much magic anyway, so i assume the best we can do is to provide some "cleanup" function with a "-dry" option, of course. -- [EMAIL PROTECTED] Development Team, Operations Northern Europe, Cable & Wireless ______________________________________________________________________ The OpenPKG Project www.openpkg.org Developer Communication List [EMAIL PROTECTED]