Skip to content

Commit

Permalink
- fixed projects not being loadable that only have a DspNetwork folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Hart committed Jan 2, 2024
1 parent 84c7d5c commit 7769823
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
11 changes: 8 additions & 3 deletions hi_core/hi_core/PresetHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -843,10 +843,15 @@ bool ProjectHandler::isValidProjectFolder(const File &file) const

bool ProjectHandler::anySubdirectoryExists(const File& possibleProjectFolder) const
{
return possibleProjectFolder.getChildFile("Scripts").isDirectory() ||
possibleProjectFolder.getChildFile("SampleMaps").isDirectory() ||
possibleProjectFolder.getChildFile("XmlPresetBackups").isDirectory();
for(const auto& dir: getSubDirectoryIds())
{
auto id = getIdentifier(dir);
id.removeCharacters("/");
if(possibleProjectFolder.getChildFile(id).isDirectory())
return true;
}

return false;
}

File ProjectHandler::getWorkDirectory() const
Expand Down
8 changes: 4 additions & 4 deletions hi_scripting/scripting/api/ScriptingApiObjects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7777,7 +7777,7 @@ struct ScriptingObjects::GlobalCableReference::DummyTarget : public scriptnode::
Path getTargetIcon() const override
{
Path path;
path.loadPathFromData(HiBinaryData::SpecialSymbols::scriptProcessor, sizeof(HiBinaryData::SpecialSymbols::scriptProcessor));
path.loadPathFromData(HiBinaryData::SpecialSymbols::scriptProcessor, SIZE_OF_PATH(HiBinaryData::SpecialSymbols::scriptProcessor));
return path;
}

Expand Down Expand Up @@ -7931,7 +7931,7 @@ struct ScriptingObjects::GlobalCableReference::Callback: public scriptnode::rout
Path getTargetIcon() const override
{
Path path;
path.loadPathFromData(HiBinaryData::SpecialSymbols::scriptProcessor, sizeof(HiBinaryData::SpecialSymbols::scriptProcessor));
path.loadPathFromData(HiBinaryData::SpecialSymbols::scriptProcessor, SIZE_OF_PATH(HiBinaryData::SpecialSymbols::scriptProcessor));
return path;
}

Expand Down Expand Up @@ -8040,7 +8040,7 @@ struct MacroCableTarget : public scriptnode::routing::GlobalRoutingManager::Cabl
Path getTargetIcon() const override
{
Path p;
p.loadPathFromData(HiBinaryData::SpecialSymbols::macros, sizeof(HiBinaryData::SpecialSymbols::macros));
p.loadPathFromData(HiBinaryData::SpecialSymbols::macros, SIZE_OF_PATH(HiBinaryData::SpecialSymbols::macros));
return p;
}

Expand Down Expand Up @@ -8135,7 +8135,7 @@ struct ProcessorParameterTarget : public scriptnode::routing::GlobalRoutingManag
Path getTargetIcon() const override
{
Path p;
p.loadPathFromData(HiBinaryData::SpecialSymbols::macros, sizeof(HiBinaryData::SpecialSymbols::macros));
p.loadPathFromData(HiBinaryData::SpecialSymbols::macros, SIZE_OF_PATH(HiBinaryData::SpecialSymbols::macros));
return p;
}

Expand Down

0 comments on commit 7769823

Please sign in to comment.