On Thu, 5 Oct 2006, Nobuyoshi Nakada wrote: > Hi, > > At Thu, 5 Oct 2006 01:25:00 +0900, > Jim Meyering wrote in [ruby-core:08999]: > > It is not at all trivial to fix this "properly". > > By "properly," I mean in a way that rm_rf can remove an arbitrarily > > deep hierarchy securely while remaining efficient and thread safe. > > Modulo hard-coded diagnostics, the C implementation in the GNU coreutils > > package (src/remove.c) should be appropriate. After a quick look, I couldn't figure that out, however: > > It doesn't feel appropriate to chdir inside a library since it affects > whole process. isn't it possible to pass a block to chdir, so that after executing the block one is back when one was? > > -- > Nobu Nakada > Hugh