aboutsummaryrefslogtreecommitdiff
path: root/ssg
diff options
context:
space:
mode:
authorMatias Linares <matiaslina@openmailbox.org>2016-02-25 01:36:46 -0300
committerMatias Linares <matiaslina@openmailbox.org>2016-02-25 01:36:46 -0300
commitd95c1f51aa137bb832451be426c0db6c7f79bf00 (patch)
tree34cee25d80d9bf204b9694be61f57ef04ec73b4b /ssg
parent574b3ecf873e5b27a3c5e8859112da10aaf7a2e9 (diff)
downloadssg-d95c1f51aa137bb832451be426c0db6c7f79bf00.tar.gz
Fix bad regex
Diffstat (limited to 'ssg')
-rwxr-xr-xssg5
1 files changed, 2 insertions, 3 deletions
diff --git a/ssg b/ssg
index e5b0476..d77851b 100755
--- a/ssg
+++ b/ssg
@@ -161,12 +161,11 @@ sub run_on {
# 3) die if the output file is in the input directory.
next if $outfile eq $mddir;
next if $outfile =~ m/(\.|\.\.)($|\/)/;
- $outfile =~ s/^$indir\//$outdir\//g;
- $outfile !~ m/^$indir/ or die "trying to write in the same directory";
+ $outfile =~ s/^$indir/$outdir/g;
+ $outfile !~ m/^$indir/ or die "trying to write in the same directory $outfile";
if($file->is_dir()) {
# make a directory
- print STDERR "calling on directory $outfile\n";
make_path $outfile;
run_on($file);
next;