diff --git a/src/apps/expander/ExpanderSettings.cpp b/src/apps/expander/ExpanderSettings.cpp index 04bf05f10a..a8f4f1bb55 100644 --- a/src/apps/expander/ExpanderSettings.cpp +++ b/src/apps/expander/ExpanderSettings.cpp @@ -29,6 +29,7 @@ #include "ExpanderSettings.h" #include +#include #include #include #include @@ -197,6 +198,13 @@ ExpanderSettings::Open(BFile *file, int32 mode) if (error != B_OK) return error; + // create the directory, if file creation is requested + if ((mode & B_CREATE_FILE) != 0) { + error = create_directory(path.Path(), 0755); + if (error != B_OK) + return error; + } + error = path.Append("settings"); if (error != B_OK) return error;