From: joey Date: Wed, 29 Mar 2006 18:35:04 +0000 (+0000) Subject: fix for replacing from underlay X-Git-Tag: 1.0~106 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2a16e15122574cca9c5b52ccfc46a022a71e25dc;p=ikiwiki.git fix for replacing from underlay --- diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 6fd1f6506..b47c8e803 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -308,10 +308,12 @@ sub cgi_editpage ($$) { #{{{ $page=lc($page); my $file=$page.$config{default_pageext}; - my $newfile=1; if (exists $pagesources{lc($page)}) { $file=$pagesources{lc($page)}; - $newfile=0; + } + my $newfile=0; + if (! -e "$config{srcdir}/$file") { + $newfile=1; } $form->field(name => "do", type => 'hidden');