[flac-dev] Bug or strange behaviour or --output-prefix
Martijn van Beurden
mvanb1 at gmail.com
Tue Dec 18 07:58:45 PST 2012
Hi all,
I was busy programming a tool to automatically run some tests to update
the FLAC comparison page (http://xiph.org/flac/comparison.html) when I
stumbled across some weird behaviour of the flac program. So I compiled
from git and it seems that this bug still is there. As I don't have any
experience on coding C and don't know which bug-report facility to use,
this seemed the right spot.
Anyway, I wanted flac to decode some file to another directory than the
current. The man page says I should use --output-prefix for that, but
that doesn't seem to work correctly. For example
flac -d --output-prefix ../ somefile.flac
seems to work fine, just as expected. However, the next example
flac -d --output-prefix ../ somedir/somefile.flac
doesn't work as expected. the FLAC utility seems to try to decode to the
directory ../somedir which doesn't exist. Even using absolute paths do
not work. For example
flac -d --output-prefix /home/someuser/ /home/someuser/somedir/somefile.flac
it seems that it is trying to encode to
/home/someuser/home/someuser/somedir/somefile.flac. This can't be the
intended behaviour right? Now I think of it, what I expected was similar
behaviour to something which I would call --output-directory. The way
this is coded looks like a quick fix, but to me it seems this is only
useful when one has to use a file in the current working directory or in
some special cases where identical directory trees are used.
So the question is, is this intended behaviour or a bug? If it is
intended, an --output-directory parameter would be useful for scripting.
More information about the flac-dev
mailing list