Ticket #2185: TrackerInitialState.cpp.diff

File TrackerInitialState.cpp.diff, 1.1 KB (added by kaoutsis, 11 years ago)
  • src/kits/tracker/TrackerInitialState.cpp

     
    3636// add code to initialize a subset of the mime database, including
    3737// important sniffer rules
    3838
     39#include <Alert.h>
    3940#include <Directory.h>
    4041#include <InterfaceDefs.h>
    4142#include <Message.h>
     
    459460{
    460461    // make the large Haiku Logo the default background
    461462
    462 //  BPath path;
    463     BPath path("/boot/beos/etc/artwork");
     463    BPath path;
     464    status_t status = find_directory(B_BEOS_ETC_DIRECTORY, &path);
     465    if (status < B_OK) {
     466        BString errorMessage;
     467        errorMessage << "At " << __PRETTY_FUNCTION__ << "\n";
     468        errorMessage << "find_directory() failed. \nReason: ";
     469        errorMessage << strerror(status);
     470        (new BAlert("AlertError", errorMessage.String(), "OK", NULL, NULL,
     471            B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go();
     472        return;
     473    }
     474    path.Append("artwork");
    464475//  FSFindTrackerSettingsDir(&path, false);
    465476//  path.Append(kDefaultFolderTemplate);
    466477