From 1d2759f1be814d7eb375f630d977d750ce60fa65 Mon Sep 17 00:00:00 2001 From: alexandre burton Date: Thu, 2 Mar 2023 13:26:50 -0500 Subject: [PATCH] search for data with .app bundle if not found besides app --- libs/openFrameworks/utils/ofFileUtils.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libs/openFrameworks/utils/ofFileUtils.cpp b/libs/openFrameworks/utils/ofFileUtils.cpp index c88528a3052..5df279f26d3 100644 --- a/libs/openFrameworks/utils/ofFileUtils.cpp +++ b/libs/openFrameworks/utils/ofFileUtils.cpp @@ -31,7 +31,12 @@ namespace{ try{ return std::filesystem::canonical(ofFilePath::join(ofFilePath::getCurrentExeDir(), "../../../data/")).string(); }catch(...){ - return ofFilePath::join(ofFilePath::getCurrentExeDir(), "../../../data/"); + try{ + return std::filesystem::canonical(ofFilePath::join(ofFilePath::getCurrentExeDir(), "../Resources/data/")).string(); + }catch(...){ + + return ofFilePath::join(ofFilePath::getCurrentExeDir(), "../../../data/"); + } } #elif defined TARGET_ANDROID return string("sdcard/");