logic: paths in ProjectSettings relative to file not working directory
This change checks all paths in the ProjectSettings file for relativity and makes them relative to the location of the ProjectSettings file if necessary. The paths are also correctly saved relative to the file.
This commit is contained in:
+3
-3
@@ -63,7 +63,7 @@ void Project::clearProjectSettings()
|
||||
bool Project::setSourceDirectoryPath(const std::string& sourceDirectoryPath)
|
||||
{
|
||||
m_projectSettingsFilepath = sourceDirectoryPath + "/ProjectSettings.xml";
|
||||
bool success = ProjectSettings::getInstance()->setSourcePaths(std::vector<std::string>(1, sourceDirectoryPath));
|
||||
bool success = ProjectSettings::getInstance()->setSourcePaths(std::vector<FilePath>(1, sourceDirectoryPath));
|
||||
|
||||
if (success)
|
||||
{
|
||||
@@ -131,8 +131,8 @@ void Project::createFileManager()
|
||||
{
|
||||
std::shared_ptr<ProjectSettings> projSettings = ProjectSettings::getInstance();
|
||||
|
||||
std::vector<std::string> sourcePaths(projSettings->getSourcePaths());
|
||||
std::vector<std::string> includePaths(sourcePaths);
|
||||
std::vector<FilePath> sourcePaths(projSettings->getSourcePaths());
|
||||
std::vector<FilePath> includePaths(sourcePaths);
|
||||
|
||||
std::vector<std::string> sourceExtensions = projSettings->getSourceExtensions();
|
||||
std::vector<std::string> includeExtensions = projSettings->getHeaderExtensions();
|
||||
|
||||
Reference in New Issue
Block a user