It always showed "imported"

This commit is contained in:
Matt Nadareski
2016-04-21 14:18:09 -07:00
parent bae642d401
commit 20e96ae507

View File

@@ -1079,8 +1079,8 @@ Make a selection:
{ {
logger.Log("Beginning import of " + filename); logger.Log("Beginning import of " + filename);
Import imp = new Import(filename, _connectionString, logger); Import imp = new Import(filename, _connectionString, logger);
imp.ImportData(); bool success = imp.ImportData();
logger.Log(filename + " imported!"); logger.Log(filename + (success ? "" : " not") + " imported!");
} }
// Check to see if the second argument is a directory that exists // Check to see if the second argument is a directory that exists
else if (filename != "" && Directory.Exists(filename)) else if (filename != "" && Directory.Exists(filename))
@@ -1089,8 +1089,8 @@ Make a selection:
{ {
logger.Log("Beginning import of " + file); logger.Log("Beginning import of " + file);
Import imp = new Import(file, _connectionString, logger); Import imp = new Import(file, _connectionString, logger);
imp.ImportData(); bool success = imp.ImportData();
logger.Log(file + " imported!"); logger.Log(file + (success ? "" : " not") + " imported!");
} }
} }
else else