From c09ce908da64f03c671f483750ce28dcecc064ac Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 30 Oct 2015 19:44:41 +0000 Subject: oldweb: fix relative path normalization We must explicitly convert Pathname to string before comparing against '.' to prevent ugly './' prefixes in relative paths from showing up. --- lib/oldweb.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oldweb.rb b/lib/oldweb.rb index d045693..12ce876 100644 --- a/lib/oldweb.rb +++ b/lib/oldweb.rb @@ -92,7 +92,7 @@ class Oldweb def rel_path(out_file) rel_prefix = @outputdir.relative_path_from(out_file.dirname) - rel_prefix == '.' ? '' : "#{rel_prefix}/" + rel_prefix.to_s == '.' ? '' : "#{rel_prefix}/" end # called standalone by servelet -- cgit v1.2.3-24-ge0c7