We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50f4a7c commit 201fa73Copy full SHA for 201fa73
distrho/src/DistrhoUtils.cpp
@@ -119,8 +119,10 @@ const char* getPluginFormatName() noexcept
119
static inline
120
void _createDirIfNeeded(const char* const dir)
121
{
122
- if (access(dir, F_OK) != 0)
123
- mkdir(dir, 0755);
+ try {
+ if (access(dir, F_OK) != 0)
124
+ mkdir(dir, 0755);
125
+ } DISTRHO_SAFE_EXCEPTION("createDirIfNeeded");
126
}
127
#endif
128
@@ -255,7 +257,10 @@ static const char* _getDocumentsDir()
255
257
256
258
// ${XDG_CONFIG_HOME}/user-dirs.dirs does not exist or has bad data
259
if (dir.isEmpty())
- dir = _getDocumentsDir();
260
+ {
261
+ dir = _getHomeDir();
262
+ dir += "Documents/";
263
+ }
264
265
_createDirIfNeeded(dir);
266
0 commit comments