update SourcetrailPythonIndexer to version 1.25.6 to fix TextAccess issue (#1159)

* before this update the SourcetrailPythonIndexer was saving indexed code to the database different than Sourcetrail, which could result in crashes
This commit is contained in:
Malte Langkabel
2021-03-09 07:43:27 +01:00
committed by GitHub
parent 7c30074165
commit 804e564c8d
4 changed files with 5 additions and 7 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash
SOURCETRAIL_PYTHON_INDEXER_VERSION="v1_db25_p5"
SOURCETRAIL_PYTHON_INDEXER_VERSION="v1_db25_p6"
# Determine current platform
PLATFORM='unknown'
@@ -73,7 +73,7 @@ void TaskExecuteCustomCommands::runPythonPostProcessing(PersistentStorage& stora
return;
}
std::shared_ptr<TextAccess> textAccess = TextAccess::createFromFile(filePath);
std::shared_ptr<TextAccess> textAccess = storage.getFileContent(filePath, false);
if (textAccess)
{
std::map<std::wstring, std::vector<std::wstring>> childToParentNodesMap;
+2 -4
View File
@@ -21,7 +21,7 @@ std::istream& safeGetline(std::istream& is, std::string& t)
while (true)
{
int c = sb->sbumpc();
const int c = sb->sbumpc();
switch (c)
{
case '\n':
@@ -77,8 +77,6 @@ std::shared_ptr<TextAccess> TextAccess::createFromLines(
return result;
}
TextAccess::~TextAccess() {}
unsigned int TextAccess::getLineCount() const
{
return static_cast<unsigned int>(m_lines.size());
@@ -142,7 +140,7 @@ std::vector<std::string> TextAccess::readFile(const FilePath& filePath)
try
{
std::ifstream srcFile;
srcFile.open(filePath.str());
srcFile.open(filePath.str(), std::ios::binary | std::ios::in);
if (srcFile.fail())
{
+1 -1
View File
@@ -16,7 +16,7 @@ public:
static std::shared_ptr<TextAccess> createFromLines(
const std::vector<std::string>& lines, const FilePath& filePath = FilePath());
virtual ~TextAccess();
virtual ~TextAccess() = default;
unsigned int getLineCount() const;
bool isEmpty() const;