summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2013-08-15 21:22:56 +0200
committerFlorian Bruhin <git@the-compiler.org>2013-08-15 21:22:56 +0200
commitf915d5c759c6a3f25c7677d95e709c9ad2db2ec2 (patch)
tree9db281d6bc2b93752889de166d266fbad1b673de
parent7c3d88a4ba8748d60f65095a87958e69b49f42f8 (diff)
downloaddrg2flac-f915d5c759c6a3f25c7677d95e709c9ad2db2ec2.tar.gz
drg2flac-f915d5c759c6a3f25c7677d95e709c9ad2db2ec2.zip
Check if input file is readable
-rwxr-xr-xdrg2flac.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/drg2flac.sh b/drg2flac.sh
index 6a39bc4..050f8ce 100755
--- a/drg2flac.sh
+++ b/drg2flac.sh
@@ -119,6 +119,10 @@ tmp=$(mktemp -d)
# Convert
for infile in "$@"; do
+ if [[ ! -r "$infile" ]]; then
+ error "$infile" "reading the file"
+ continue
+ fi
flacargs=()
echo "${cbold}===== $infile =====${cres}"
echo