File::getSpecialLocation(File::userMusicDirectory) returns empty File on some windows installations

Has anyone seen this before or has an idea how to gracefully handle this ?

File::getSpecialLocation(File::userMusicDirectory) returns empty File on some windows installations. This particular project I’m working on uses a subdirectory of this folder to store presets and on the windows machines in question these presets end up in a subfolder of “C:” - which obviously is annoying.

  • This was observed on Windows 10.
  • getSpecialLocation uses SHGetSpecialFolderPath(CSIDL_MYMUSIC) on windows.
  • I was not able to reproduced this by using all sorts of special characters in the folder and even by re-locating the folder onto a network drive.

thanks for your help!