Windows 10, Potential problem w/ erasing the "avo_xtb/last" directory prior to computation
Ineluki80 opened this issue · 1 comments
Issue: Sometimes (especially while debugging), avo_xtb jobs seem to do nothing.
Analyzing the avogadro2.log revealed the following problem.
Problem: avo_xtb is trying to delete the whole avo_xtb/last directory with rmdir().
This causes problems, if an exporer window or a cmd instance is opened inside this directory e.g. for debugging reasons or the "go to calculation files" menu entry.
Reason: Windows/rmdir() can't delete the directory because it is still in use in the other processes. Therefore, the whole script failes immediately.
Solution: Do not delete the computation directory directly, delete files and subdirectories within it instead. At least provide a message to the user that the system is unable to delete the directory.
Ok, I hadn't realized that because on Linux there's no problem with deleting a directory that is open in the file explorer.
I'll be less lazy about it and just clear the contents rather than the folder itself.