]> scripts.mit.edu Git - www/ikiwiki.git/commitdiff
add missing undef guard in derel
authorJoey Hess <joey@kitenet.net>
Wed, 21 Apr 2010 23:45:56 +0000 (19:45 -0400)
committerJoey Hess <joey@kitenet.net>
Wed, 21 Apr 2010 23:45:56 +0000 (19:45 -0400)
IkiWiki.pm

index 4084d499727127bad14a7f4bf9906797f8e0a4d3..8af290745283a5bc86c45cc4bffb9e156cda5a05 100644 (file)
@@ -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;