From 02cf6d0008666f597478027f25808f3d97cb2149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 29 Jul 2005 13:17:40 +0000 Subject: [PATCH] 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 --- src/apps/terminal/PrefHandler.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/apps/terminal/PrefHandler.cpp b/src/apps/terminal/PrefHandler.cpp index 4d5c2c5fd9..9b8cc761be 100644 --- a/src/apps/terminal/PrefHandler.cpp +++ b/src/apps/terminal/PrefHandler.cpp @@ -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];