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
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <FindDirectory.h>
|
#include <FindDirectory.h>
|
||||||
|
#include <Path.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
@@ -74,14 +75,11 @@ bool BSoftSynth::IsLoaded(void) const
|
|||||||
|
|
||||||
status_t BSoftSynth::SetDefaultInstrumentsFile()
|
status_t BSoftSynth::SetDefaultInstrumentsFile()
|
||||||
{
|
{
|
||||||
char buf[B_PATH_NAME_LENGTH + 1];
|
BPath path;
|
||||||
|
if (B_OK == find_directory(B_SYNTH_DIRECTORY, &path, false, NULL))
|
||||||
if (B_OK == find_directory(
|
|
||||||
B_SYNTH_DIRECTORY, NULL, false, buf, B_PATH_NAME_LENGTH))
|
|
||||||
{
|
{
|
||||||
strcat(buf, "/");
|
path.Append(B_BIG_SYNTH_FILE);
|
||||||
strcat(buf, B_BIG_SYNTH_FILE);
|
return SetInstrumentsFile(path.Path());
|
||||||
return SetInstrumentsFile(buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|||||||
Reference in New Issue
Block a user