Skip to content

Commit

Permalink
return error also if not using $debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Lange committed Jul 28, 2016
1 parent e5d3043 commit 0384d8e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/fcopy
Expand Up @@ -89,7 +89,11 @@ sub copy_one {

# $prefix/$source must be a directory
if (-f $ps) { ewarn("$ps is a file, but must be a directory containing templates.");return };
unless (-d $ps) { ewarn("Nonexisting directory $ps. No files copied.") if $debug;return }
unless (-d $ps) {
ewarn("Nonexisting directory $ps. No files copied.") if $debug;
$error = 1; # we could not copy anything
return;
}

# use the last class for which a file exists
foreach (@classes) { $class = $_,last if -f "$ps/$_" || ($opt_H && -l "$ps/$_"); }
Expand Down

0 comments on commit 0384d8e

Please sign in to comment.