diff --git a/src/apps/codycam/CodyCam.cpp b/src/apps/codycam/CodyCam.cpp
index 2a68bce107..0df1c060a6 100644
--- a/src/apps/codycam/CodyCam.cpp
+++ b/src/apps/codycam/CodyCam.cpp
@@ -15,6 +15,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -22,6 +23,7 @@
#include
#include
+#include
#undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_CONTEXT "CodyCam"
@@ -169,7 +171,11 @@ CodyCam::CodyCam()
kUploadClients[index++] = B_TRANSLATE("SFTP");
kUploadClients[index++] = B_TRANSLATE("Local");
- chdir("/boot/home");
+ BPath homeDir;
+ if (find_directory(B_USER_DIRECTORY, &homeDir) != B_OK)
+ homeDir.SetTo("/boot/home");
+
+ chdir(homeDir.Path());
}
diff --git a/src/apps/icon-o-matic/IconEditorApp.cpp b/src/apps/icon-o-matic/IconEditorApp.cpp
index 65c48b8610..27f73a9484 100644
--- a/src/apps/icon-o-matic/IconEditorApp.cpp
+++ b/src/apps/icon-o-matic/IconEditorApp.cpp
@@ -17,6 +17,8 @@
#include
#include
#include
+#include
+#include
#include "support_settings.h"
@@ -329,8 +331,14 @@ IconEditorApp::_LastFilePath(path_kind which)
path = fLastOpenPath.String();
break;
}
- if (!path)
- path = "/boot/home";
+ if (!path) {
+
+ BPath homePath;
+ if (find_directory(B_USER_DIRECTORY, &homePath) == B_OK)
+ path = homePath.Path();
+ else
+ path = "/boot/home";
+ }
return path;
}
diff --git a/src/apps/mediaconverter/MediaConverterWindow.cpp b/src/apps/mediaconverter/MediaConverterWindow.cpp
index 2d1cc7e8cf..d97dcb1b0e 100644
--- a/src/apps/mediaconverter/MediaConverterWindow.cpp
+++ b/src/apps/mediaconverter/MediaConverterWindow.cpp
@@ -31,6 +31,8 @@
#include
#include
+#include
+
#include "MediaFileInfoView.h"
#include "MediaFileListView.h"
#include "MessageConstants.h"
@@ -122,8 +124,10 @@ MediaConverterWindow::MediaConverterWindow(BRect frame)
fConverting(false),
fCancelling(false)
{
- const char* defaultDirectory = "/boot/home";
- fOutputDir.SetTo(defaultDirectory);
+ BPath outputDir;
+ if (find_directory(B_USER_DIRECTORY, &outputDir) != B_OK)
+ outputDir.SetTo("/boot/home");
+ fOutputDir.SetTo(outputDir.Path());
fMenuBar = new BMenuBar("menubar");
_CreateMenu();
@@ -165,7 +169,7 @@ MediaConverterWindow::MediaConverterWindow(BRect frame)
fDestButton = new BButton(B_TRANSLATE("Output folder"),
new BMessage(OUTPUT_FOLDER_MESSAGE));
BAlignment labelAlignment(be_control_look->DefaultLabelAlignment());
- fOutputFolder = new BStringView(NULL, defaultDirectory);
+ fOutputFolder = new BStringView(NULL, outputDir.Path());
fOutputFolder->SetExplicitAlignment(labelAlignment);
// start/end duration