aboutsummaryrefslogtreecommitdiffstats
path: root/lib/LXRng/Web.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/LXRng/Web.pm')
-rw-r--r--lib/LXRng/Web.pm6
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);