From d2dcc20c0fb29befb865e702f604a6f9b81f627f Mon Sep 17 00:00:00 2001 From: dreamer Date: Sat, 30 Aug 2025 22:33:15 +0200 Subject: [PATCH] try escaping output and search paths --- Source/Heavy/ExporterBase.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Source/Heavy/ExporterBase.h b/Source/Heavy/ExporterBase.h index ffda61fbb..38aca821c 100644 --- a/Source/Heavy/ExporterBase.h +++ b/Source/Heavy/ExporterBase.h @@ -128,7 +128,7 @@ struct ExporterBase : public Component void startExport(File const& outDir) { auto patchPath = patchFile.getFullPathName(); - auto const& outPath = outDir.getFullPathName(); + auto const& outPath = "\"" + outDir.getFullPathName() + "\""; auto projectTitle = projectNameValue.toString(); auto projectCopyright = projectCopyrightValue.toString(); @@ -140,7 +140,7 @@ struct ExporterBase : public Component } // Add original file location to search paths - auto searchPaths = StringArray { realPatchFile.getParentDirectory().getFullPathName() }; + auto searchPaths = StringArray { "\"" + realPatchFile.getParentDirectory().getFullPathName() + "\""}; editor->pd->setThis(); @@ -149,12 +149,8 @@ struct ExporterBase : public Component int numItems; pd::Interface::getSearchPaths(paths, &numItems); - if (realPatchFile.existsAsFile()) { - searchPaths.add(realPatchFile.getParentDirectory().getFullPathName()); - } - for (int i = 0; i < numItems; i++) { - searchPaths.add(paths[i]); + searchPaths.add("\"" + String(paths[i]) + "\""); } // Make sure we don't add the file location twice