avoid uninitialized value warning when running -dumpsetup

Here wikistatedir has not been configured.
master
Joey Hess 2011-02-25 17:32:36 -04:00
parent 6982e458c0
commit ecd2153a70
1 changed files with 6 additions and 4 deletions

View File

@ -25,10 +25,12 @@ sub getsetup () {
our $transientdir;
sub checkconfig () {
$transientdir = $config{wikistatedir}."/transient";
# add_underlay treats relative underlays as relative to the installed
# location, not the cwd. That's not what we want here.
IkiWiki::add_literal_underlay($transientdir);
if (defined $config{wikistatedir}) {
$transientdir = $config{wikistatedir}."/transient";
# add_underlay treats relative underlays as relative to the installed
# location, not the cwd. That's not what we want here.
IkiWiki::add_literal_underlay($transientdir);
}
}
sub change (@) {