Fixed a few problems with SQL databases (#6242)
Fixes #6202
Follow up to 6b84115
Thanks to @bgamez23
This commit is contained in:
@@ -139,9 +139,11 @@ bool process( const std::string& type, uint32 version, const std::vector<std::st
|
||||
const std::string to = "sql-files/" + to_table + ".sql";
|
||||
|
||||
if( fileExists( from ) ){
|
||||
#ifndef CONVERT_ALL
|
||||
if( !askConfirmation( "Found the file \"%s\", which can be converted to sql.\nDo you want to convert it now? (Y/N)\n", from.c_str() ) ){
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
inNode.reset();
|
||||
|
||||
@@ -156,11 +158,13 @@ bool process( const std::string& type, uint32 version, const std::vector<std::st
|
||||
if (!inNode["Body"].IsDefined())
|
||||
continue;
|
||||
|
||||
#ifndef CONVERT_ALL
|
||||
if (fileExists(to)) {
|
||||
if (!askConfirmation("The file \"%s\" already exists.\nDo you want to replace it? (Y/N)\n", to.c_str())) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
out.open(to);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user