]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Render.pm
* Improve code that ignores files in the underlaydir if the srcdir has a
[ikiwiki.git] / IkiWiki / Render.pm
index 86396420736a8e7120815da60b579e9781b8b0cb..678075b821178b089ea7c4dab27874a5e15647c2 100644 (file)
@@ -247,13 +247,16 @@ sub refresh () { #{{{
                                        warn("skipping bad filename $_\n");
                                }
                                else {
-                                       # Don't add files that are in the
+                                       # Don't add pages that are in the
                                        # srcdir.
                                        $f=~s/^\Q$config{underlaydir}\E\/?//;
                                        if (! -e "$config{srcdir}/$f" && 
                                            ! -l "$config{srcdir}/$f") {
-                                               push @files, $f;
-                                               $exists{pagename($f)}=1;
+                                               my $page=pagename($f);
+                                               if (! $exists{$page}) {
+                                                       push @files, $f;
+                                                       $exists{$page}=1;
+                                               }
                                        }
                                }
                        }
@@ -266,10 +269,10 @@ sub refresh () { #{{{
        my @add;
        foreach my $file (@files) {
                my $page=pagename($file);
+               $pagesources{$page}=$file;
                if (! $oldpagemtime{$page}) {
                        push @add, $file;
                        $pagecase{lc $page}=$page;
-                       $pagesources{$page}=$file;
                        if ($config{getctime} && -e "$config{srcdir}/$file") {
                                $pagectime{$page}=rcs_getctime("$config{srcdir}/$file");
                        }