Jan Dubois wrote: >> So I'm thinking that the right things to do is to not croak and just >> ignore the remaining directories in the list to be unlinked, and the >> current directory remains changed. > > I prefer to keep the croak. Changing the working directory as an > unintended side effect should be a fatal error: > > rmtree( '../../to' ); > rmtree( 'here/too' ); > > How do you prevent the second rmtree() from removing the wrong tree? Hmm. You don't. That's good enough for me. Thanks, DavidThread Previous | Thread Next