My program is a kind of Digital Library, in which file can be "imported" to the library by inserting its path to a database. I am now implementing a function that can real time detect any file operation performed on file system, and so trigger the database update.
When "REMOVE DIRECTORY" is detected, then all files in that deleted directory will be removed from our database.
However, when i try to remove a directory outside the program when the program is running, the directory CANNOT be deleted, because of sharing violation.
I found that the directory can be deleted before "imported" to the Library, but fail afterwards.
Can anyone tell me where the problem is, and how can i fix it?
