(this affects callers of
Fixes issues where we tried to open a file for writing without checking if the parent directories existed (e.g. bug #1719629)
I scanned the code and didn't find any obvious problems but could you please cross-check if this could potentially cause issues?
Normal file saving is not affected as all implementations of the file save dialog prevent the user to specify non-existing directories. However it might affect some command line usage scenarios.