BSoftSynth::SetInstrumentsFile(): Check if file exists.
This commit is contained in:
parent
c0622eb3d3
commit
f511367b33
@ -124,10 +124,12 @@ BSoftSynth::SetInstrumentsFile(const char* path)
|
|||||||
if (path == NULL)
|
if (path == NULL)
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
|
if (!BEntry(path).Exists())
|
||||||
|
return B_FILE_NOT_FOUND;
|
||||||
|
|
||||||
if (IsLoaded())
|
if (IsLoaded())
|
||||||
Unload();
|
Unload();
|
||||||
|
|
||||||
// TODO: Check for file existence ?
|
|
||||||
fInstrumentsFile = strdup(path);
|
fInstrumentsFile = strdup(path);
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user