Since we now only have a single file to save, we no longer create a sub-directory

"HaikuTerminal" in the user settings directory, but just a file called either
"Terminal" (for the Haiku build) or "HaikuTerminal" (for the R5 build).
Last commit also made sure the settings target path existed - this is now no
longer necessary, and thus, disabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13856 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-07-29 13:17:40 +00:00
parent 3436ff6e3a
commit 02cf6d0008

View File

@ -114,9 +114,12 @@ PrefHandler::GetDefaultPath(BPath& path)
if (find_directory(B_USER_SETTINGS_DIRECTORY, &path, true) != B_OK)
return B_ERROR;
// TODO: maybe just "Terminal"? (but this collides with the R5 Terminal settings file)
#ifdef __HAIKU__
path.Append("Terminal");
#else
path.Append("HaikuTerminal");
path.Append("settings");
#endif
//path.Append("settings");
return B_OK;
}
@ -148,9 +151,12 @@ status_t
PrefHandler::Save(const char *path)
{
// make sure the target path exists
#if 0
// TODO: currently not needed as we're reusing the standard directory
BPath directoryPath(path);
if (directoryPath.GetParent(&directoryPath) == B_OK)
create_directory(directoryPath.Path(), 0755);
#endif
BFile file(path, B_WRITE_ONLY | B_CREATE_FILE | B_ERASE_FILE);
return fContainer.Flatten(&file);
@ -162,9 +168,11 @@ PrefHandler::SaveAsText(const char *path, const char *mimetype,
const char *signature)
{
// make sure the target path exists
#if 0
BPath directoryPath(path);
if (directoryPath.GetParent(&directoryPath) == B_OK)
create_directory(directoryPath.Path(), 0755);
#endif
BFile file(path, B_WRITE_ONLY | B_CREATE_FILE | B_ERASE_FILE);
char buffer[512];