Bug fix in flac directory creation.
authorSteve Youngs <steve@steveyoungs.com>
Wed, 22 Jun 2011 03:12:02 +0000 (13:12 +1000)
committerSteve Youngs <steve@steveyoungs.com>
Wed, 22 Jun 2011 03:12:02 +0000 (13:12 +1000)
This was actually fairly harmless, the worst that could happen was a
warning from mkdir(1) on stdout.  But annoying nonetheless.  This patch
fixes that.

* zcdrip.in (_album_to_dir): Fix syntax bug that was causing
flac directory creation to be attempted even if flac encoding
wasn't requested.

Signed-off-by: Steve Youngs <steve@steveyoungs.com>
zcdrip.in

index ea57c23..f6897ec 100644 (file)
--- a/zcdrip.in
+++ b/zcdrip.in
@@ -5,7 +5,7 @@
 ## Author:        Steve Youngs <steve@steveyoungs.com>
 ## Maintainer:    Steve Youngs <steve@steveyoungs.com>
 ## Created:       <2006-08-08>
-## Time-stamp:    <Sunday Jun 19, 2011 16:47:17 steve>
+## Time-stamp:    <Wednesday Jun 22, 2011 13:00:06 steve>
 
 ## Redistribution and use in source and binary forms, with or without
 ## modification, are permitted provided that the following conditions
@@ -579,7 +579,11 @@ _album_to_dir ()
 
     dir=$(pwd)/${tart}/${talbum}
     [[ -d ${dir} ]] || mkdir -p ${dir}
-    [[ $keep_flac == yes ]] && fdir=${dir}/flac; mkdir -p ${fdir}
+
+    if [[ $keep_flac == yes ]]; then
+       fdir=${dir}/flac
+       mkdir -p ${fdir}
+    fi
 }