diff options
author | Arne Georg Gleditsch <argggh@pelargir.(none)> | 2008-02-19 12:04:19 +0100 |
---|---|---|
committer | Arne Georg Gleditsch <argggh@pelargir.(none)> | 2008-02-19 12:04:19 +0100 |
commit | e448ddd25bfd02007f22afc779ff4a4da332b7bd (patch) | |
tree | ef81ae36f50c74e5367f0dd1cf53849fef921009 | |
parent | 3264b818f7a8d381211e30f65498acd363ccdf32 (diff) |
Don't attempt to create cache dir unless cache is in use.
-rw-r--r-- | lib/LXRng/Web.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/LXRng/Web.pm b/lib/LXRng/Web.pm index 28a3f3a..4ded41c 100644 --- a/lib/LXRng/Web.pm +++ b/lib/LXRng/Web.pm @@ -119,8 +119,10 @@ sub print_markedup_file { } else { my $cache; - mkpath($cfile, 0, 0777); - open($cache, '>', "$cfile/0") if $cfile; + if ($cfile) { + mkpath($cfile, 0, 0777); + open($cache, '>', "$cfile/0"); + } my $handle = $node->handle(); LXRng::Lang->init($context); my $lang = LXRng::Lang->new($node); |