Use parsePath for the fifo output's path parameter.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6623 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
c734c13b5c
commit
df32eed2cc
@ -164,23 +164,23 @@ static int openFifo(FifoData *fd)
|
|||||||
static int fifo_initDriver(AudioOutput *audioOutput, ConfigParam *param)
|
static int fifo_initDriver(AudioOutput *audioOutput, ConfigParam *param)
|
||||||
{
|
{
|
||||||
FifoData *fd;
|
FifoData *fd;
|
||||||
BlockParam *path = NULL;
|
BlockParam *blockParam;
|
||||||
|
char *path;
|
||||||
|
|
||||||
if (param)
|
blockParam = getBlockParam(param, "path");
|
||||||
path = getBlockParam(param, "path");
|
if (!blockParam) {
|
||||||
|
|
||||||
if (!path) {
|
|
||||||
FATAL("No \"path\" parameter specified for fifo output "
|
FATAL("No \"path\" parameter specified for fifo output "
|
||||||
"defined at line %i\n", param->line);
|
"defined at line %i\n", param->line);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path->value[0] != '/') {
|
path = parsePath(blockParam->value);
|
||||||
FATAL("\"path\" parameter for fifo output is not an absolute "
|
if (!path) {
|
||||||
"path at line %i\n", param->line);
|
FATAL("Could not parse \"path\" parameter for fifo output "
|
||||||
|
"at line %i\n", blockParam->line);
|
||||||
}
|
}
|
||||||
|
|
||||||
fd = newFifoData();
|
fd = newFifoData();
|
||||||
fd->path = xstrdup(path->value);
|
fd->path = path;
|
||||||
audioOutput->data = fd;
|
audioOutput->data = fd;
|
||||||
|
|
||||||
if (openFifo(fd) < 0) {
|
if (openFifo(fd) < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user