Expander: create settings directory, if necessary

Fixes #9846.
This commit is contained in:
Ingo Weinhold 2013-07-01 13:26:29 +02:00
parent 5a7d7bc5dd
commit 178d2f9fb9

View File

@ -29,6 +29,7 @@
#include "ExpanderSettings.h"
#include <ByteOrder.h>
#include <Directory.h>
#include <Screen.h>
#include <FindDirectory.h>
#include <Entry.h>
@ -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;