Add the root file in the included file vector
This commit is contained in:
parent
8806ec2215
commit
33d035804f
1 changed files with 5 additions and 2 deletions
|
|
@ -39,11 +39,14 @@ void removeCommentOnLine(absl::string_view& line)
|
|||
|
||||
bool sfz::Parser::loadSfzFile(const fs::path& file)
|
||||
{
|
||||
includedFiles.clear();
|
||||
|
||||
const auto sfzFile = file.is_absolute() ? file : originalDirectory / file;
|
||||
if (!fs::exists(sfzFile))
|
||||
return false;
|
||||
|
||||
originalDirectory = file.parent_path();
|
||||
includedFiles.push_back(file);
|
||||
std::vector<std::string> lines;
|
||||
readSfzFile(file, lines);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue