File relative-path-for-appimage.patch of Package bespokesynth

diff --git a/Source/OpenFrameworksPort.cpp b/Source/OpenFrameworksPort.cpp
index 24ce3d25..481d548f 100644
--- a/Source/OpenFrameworksPort.cpp
+++ b/Source/OpenFrameworksPort.cpp
@@ -89,12 +89,14 @@ std::string ofToFactoryPath(const std::string& subdir)
 #else
    auto resDir = juce::File::getSpecialLocation(juce::File::SpecialLocationType::currentExecutableFile).getSiblingFile(subdir);
 #if BESPOKE_LINUX
-   if (!resDir.isDirectory())
+   if (getenv("APPIMAGE") != NULL)
    {
-      resDir = juce::File::getSpecialLocation(juce::File::SpecialLocationType::currentApplicationFile).getChildFile("../../share/BespokeSynth").getChildFile(subdir);
-      if (!resDir.isDirectory())
-         resDir = juce::File{ juce::CharPointer_UTF8{ Bespoke::CMAKE_INSTALL_PREFIX } }.getChildFile("share/BespokeSynth").getChildFile(subdir);
+      result = "././share/BespokeSynth/" + subdir;
+      return result;
    }
+
+   if (!resDir.isDirectory())
+      resDir = juce::File{ juce::CharPointer_UTF8{ Bespoke::CMAKE_INSTALL_PREFIX } }.getChildFile("share/BespokeSynth").getChildFile(subdir);
 #endif
 #endif
    if (!resDir.isDirectory())
openSUSE Build Service is sponsored by