]> git.alsa-project.org Git - alsa-utils.git/commit
arecord: Remove only regular files
authorAlexander Volkov <a.volkov@rusbitech.ru>
Mon, 21 Sep 2015 13:05:57 +0000 (16:05 +0300)
committerTakashi Iwai <tiwai@suse.de>
Wed, 23 Sep 2015 13:27:40 +0000 (15:27 +0200)
commit5f0fc49a3ab9e9a66eb7a74582829c21556506a1
treeb6b51f9004811be207297c8690f2ab6eab591870
parent4482cc7cfe97fd69b38687816a6450b0fcc9ba59
arecord: Remove only regular files

arecord removes a file before writing into it. It's not
appropriate in some cases. For example, if you a pass
a symlink to a file, then the symlink will be removed
while the user expects to record into the symlink's target.
Another case is recording into the device file. Some
modems provide a tty device file as a voice device.
And it's not possible to write into it under root with
arecord, because it removes the device file.

So check the type of a file before writing into it and
remove only regular files.

Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
aplay/aplay.c