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:
@@ -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;
|
||||
|
||||
@@ -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())
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user