From d1c8cf1d2f74d4f311be9187820b7c0dd805b9be Mon Sep 17 00:00:00 2001 From: mahlzeit Date: Thu, 13 May 2004 17:32:42 +0000 Subject: [PATCH] Hey Axel, I changed it to use a BPath ;-) git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7568 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/midi/SoftSynth.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/kits/midi/SoftSynth.cpp b/src/kits/midi/SoftSynth.cpp index 606c08d49e..3cbea5b563 100644 --- a/src/kits/midi/SoftSynth.cpp +++ b/src/kits/midi/SoftSynth.cpp @@ -22,6 +22,7 @@ */ #include +#include #include #include @@ -74,14 +75,11 @@ bool BSoftSynth::IsLoaded(void) const status_t BSoftSynth::SetDefaultInstrumentsFile() { - char buf[B_PATH_NAME_LENGTH + 1]; - - if (B_OK == find_directory( - B_SYNTH_DIRECTORY, NULL, false, buf, B_PATH_NAME_LENGTH)) + BPath path; + if (B_OK == find_directory(B_SYNTH_DIRECTORY, &path, false, NULL)) { - strcat(buf, "/"); - strcat(buf, B_BIG_SYNTH_FILE); - return SetInstrumentsFile(buf); + path.Append(B_BIG_SYNTH_FILE); + return SetInstrumentsFile(path.Path()); } return B_ERROR;