From d95c1f51aa137bb832451be426c0db6c7f79bf00 Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Thu, 25 Feb 2016 01:36:46 -0300 Subject: Fix bad regex --- ssg | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ssg') 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; -- cgit v1.2.3-70-g09d2