From f61b0e49e0511aeeeb61464ed160a7cd99fb1b40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Mon, 12 May 2008 10:02:48 +0000 Subject: [PATCH] Patch from Kaoutsis: replace hard coded path with find_directory(B_BEOS_ETC_DIRECTORY, ...) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25461 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/tracker/TrackerInitialState.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/kits/tracker/TrackerInitialState.cpp b/src/kits/tracker/TrackerInitialState.cpp index ad29214161..467c94f44b 100644 --- a/src/kits/tracker/TrackerInitialState.cpp +++ b/src/kits/tracker/TrackerInitialState.cpp @@ -36,6 +36,7 @@ All rights reserved. // add code to initialize a subset of the mime database, including // important sniffer rules +#include #include #include #include @@ -459,8 +460,18 @@ TTracker::InstallTemporaryBackgroundImages() { // make the large Haiku Logo the default background -// BPath path; - BPath path("/boot/beos/etc/artwork"); + BPath path; + status_t status = find_directory(B_BEOS_ETC_DIRECTORY, &path); + if (status < B_OK) { + BString errorMessage; + errorMessage << "At " << __PRETTY_FUNCTION__ << "\n"; + errorMessage << "find_directory() failed. \nReason: "; + errorMessage << strerror(status); + (new BAlert("AlertError", errorMessage.String(), "OK", NULL, NULL, + B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); + return; + } + path.Append("artwork"); // FSFindTrackerSettingsDir(&path, false); // path.Append(kDefaultFolderTemplate);