When adding an index directory, we didn't account for it in DropDB, causing os.Remove to error with "directory is not empty". This commit simply iterates over all directory entries in the storage path and renames them, rather than only renaming a pre-specified subset. Additionally, Remove has been changed to RemoveAll in DropDB, which handles directories with elements still in them.
When adding an index directory, we didn't account for it in DropDB, causing os.Remove to error with "directory is not empty". This commit simply iterates over all directory entries in the storage path and renames them, rather than only renaming a pre-specified subset. Additionally, Remove has been changed to RemoveAll in DropDB, which handles directories with elements still in them.