Hi
I'm using DirectoryInfo.Delete so that when a product is removed, all
it's associated images (including the folder they sit in) are deleted.
This actually seems to work fine. However, the folder is not deleted,
but stays and becomes totally locked down. I can no longer open it in
Windows Explorer and when I try to re-launch VS 2005 debug, it
complains because it can no longer monitor that folder .. because it's
denied access.
Any ideas what could be causing this? When the site goes live I don't
want to end up with a load of locked and redundant folders.
I'm guessing it's something to do with the folder being in use by the
..net framework, although I've no idea why it doesn't get deleted. I was
wondering if there's some kind of final cleanup (like a .dispose) I
need to do with the DirectoryInfo object to free up the folder for
deletion?
Any ideas welcome! :)
Thanks,
Matt