summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 4084d4997..8af290745 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -2245,7 +2245,7 @@ sub derel ($$) {
if ($path =~ m!^\./!) {
$from=~s#/?[^/]+$## if defined $from;
$path=~s#^\./##;
- $path="$from/$path" if length $from;
+ $path="$from/$path" if defined $from && length $from;
}
return $path;