FileChooser with saveMode and canSelectDirectories doesn't show

I have come across some weird behavior in the native FileChooser on Windows when trying to run it asynchronous exactly as the “Detailed Description” shows. I would like to let the user select a location on the system to save a folder (and I would like to prepopulate the “File name:” field with something like “suggestedFolderName” so as filepath I give it something like juce::File(C:/suggestedFolderName))

So the appropriate flags would be:

folderChooserFlags = FileBrowserComponent::saveMode| FileBrowserComponent::canSelectDirectories;

But this does unfortunately close the Window again immediately.

If I choose only the save Mode:

folderChooserFlags = FileBrowserComponent::saveMode;

I do get a filechooser window but the “File name:” is prepopulated with suggestedFolderName.suggestedFolderName

And if I choose the following flags the prepoulation is correct but I get the Juce FileChooser instead of the native one:
folderChooserFlags = FileBrowserComponent::saveMode| FileBrowserComponent::canSelectDirectories | FileBrowserComponent::canSelectFiles;

@reuk Im curious to know if this is just not intended by Juce and I would have to implement the native behaviour myself? Even for the old modal way there is only browseForDirectory(), browseForFileToSave(), … but no browseForDirectoryToSave()

For MacOSX I haven’t tested the behaviour yet.

Posted the solution to the problem here