Skip to content

Commit

Permalink
[FIX] fix index compatibility check for non-reduced indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
h-2 committed Oct 22, 2015
1 parent 63c5357 commit fb16fef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lambda.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,9 @@ loadDbIndexFromDisk(TGlobalHolder & globalHolder,
else
path += ".sa";

// Check if the index is of the old format (pre 0.9.0)
if (fileExists(toCString(path + ".txt.concat"))) // these files are not written anymore
// Check if the index is of the old format (pre 0.9.0) by looking for different files
if ((TGlobalHolder::alphReduction && fileExists(toCString(path + ".txt.concat"))) ||
(!TGlobalHolder::alphReduction && TGlobalHolder::indexIsFM && !fileExists(toCString(path + ".lf.drv.wtc.24"))))
{
std::cerr << ((options.verbosity == 0) ? strIdent : std::string())
<< " failed.\n"
Expand Down

0 comments on commit fb16fef

Please sign in to comment.