Make Import search through subdirectories

This is useful if the user doesn't want to remove files from their current structure (e.g. TOSEC).
This commit is contained in:
Matt Nadareski
2016-03-31 12:27:30 -07:00
parent ce93503af3
commit 382f8a2d02

View File

@@ -362,7 +362,7 @@ or 'b' to go back to the previous menu:");
// Check to see if the second argument is a directory that exists
else if (filename != "" && Directory.Exists(filename))
{
foreach (string file in Directory.GetFiles(filename, "*", SearchOption.TopDirectoryOnly))
foreach (string file in Directory.GetFiles(filename, "*", SearchOption.AllDirectories))
{
logger.Log("Beginning import of " + file);
Import imp = new Import(file, _connectionString, logger);