summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-04-21 19:45:56 -0400
committerJoey Hess <joey@kitenet.net>2010-04-21 19:45:56 -0400
commit673d6c958050b7ce07d5d8512d5370f9531225cd (patch)
treef8c9e51ba32cfb143eedbe3956da4e49beecd1a2
parent1a09cddd39d4e15c442973dc256bf91b3c27997c (diff)
add missing undef guard in derel
-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;