Due to ReturnSpecialDirectories being set to true, the IEnumerable contained \\. and \\.. for current and all subdirectories. This resulted in the path with \\. at the end not being seen as equal as dropFolder.ImportFolderLocation in RecursiveDeleteEmptyDirectories. Simply setting this flag to false should resolve this and another issue like duplicate subdirectory entries. Also made the delete function run only when the IEnumerable is not empty.
Due to
ReturnSpecialDirectories
being set totrue
, theIEnumerable
contained\\.
and\\..
for current and all subdirectories. This resulted in the path with\\.
at the end not being seen as equal asdropFolder.ImportFolderLocation
inRecursiveDeleteEmptyDirectories
. Simply setting this flag tofalse
should resolve this and another issue like duplicate subdirectory entries. Also made the delete function run only when theIEnumerable
is not empty.