defaultDataPath() can't handle junction correctly (on Windows)
Consider following directories structure:
Project
+-- Debug (contains *.exe)
| +-- data => Project\data
+-- Release
| +-- data => Project\data
|
+-- data (contains *.png)
where both Project\Debug\data, and Project\Release\data are "symlinks" (junctions) to Project\data.
In such situation it's impossible to load resources (images) from Project\Debug\data or Project\Release\data, because defaultDataPath() builds wrong path.
The problem lies in code:
return std::filesystem::canonical(ofFilePath::join(ofFilePath::getCurrentExeDir(), "data/")).make_preferred().string();
join returns correct path like X:\...\Project\Debug\data/, while boost::filesystem::canonical seems to be trying to expand the path to something like X:\...\Project\Debug\Project\Debug\data, which is completely incorrect.
This is a known issue in boost::fs (see https://svn.boost.org/trac10/ticket/10900 and https://svn.boost.org/trac10/ticket/11138), which seems to be fixed at the main branch.
Tested with released version 0.10.1.
Hello @Anton-V-K can you please check if this issue is still relevant on nightly builds? thank you