in reply to rmtree() is failing after some time

I know it will sound ridiculous, but make certain your current directory is not within the directory tree you are deleting.

I had this happen in a previous system where an in-house module was changing the directory on me. Under Linux, this did not cause an immediate problem (you can delete your current directory). On Windows, it caused an immediate failure.

G. Wade
  • Comment on Re: rmtree() is failing after some time

Replies are listed 'Best First'.
Re^2: rmtree() is failing after some time
by KristinaBurden (Initiate) on Apr 23, 2009 at 13:37 UTC
    Before calling rmtree() I am already making sure that I change current directory to a directory that always exists and is not within the directory I am trying to delete.