mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Replace the upgradefluxfile builtin with a seperate upgrade-flux-file tool.
This allows us to remove all the SQL stuff from the main program, and restores the ability to upgrade from version 2 SQL files.
This commit is contained in:
@@ -53,10 +53,8 @@ std::unique_ptr<FluxSource> FluxSource::createFl2FluxSource(const Fl2FluxSourceP
|
||||
char buffer[16];
|
||||
std::ifstream(config.filename(), std::ios::in | std::ios::binary).read(buffer, 16);
|
||||
if (strncmp(buffer, "SQLite format 3", 16) == 0)
|
||||
{
|
||||
std::cerr << "Warning: reading a deprecated flux file format; please upgrade it\n";
|
||||
return FluxSource::createSqliteFluxSource(config.filename());
|
||||
}
|
||||
Error() << "this flux file is too old; please use the upgrade-flux-file to upgrade it";
|
||||
|
||||
return std::unique_ptr<FluxSource>(new Fl2FluxSource(config));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user