summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tool/fake.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/fake.rb b/tool/fake.rb
index b2bdd08..9fe95a5 100644
--- a/tool/fake.rb
+++ b/tool/fake.rb
@@ -41,7 +41,7 @@ prehook = proc do |extmk|
dir.shift
pwd.shift
end
- builddir = File.join([".."]*pwd.size + dir)
+ builddir = File.join((pwd.empty? ? ["."] : [".."]*pwd.size) + dir)
builddir = "." if builddir.empty?
end
join = proc {|*args| File.join(*args).sub!(/\A(?:\.\/)*/, '')}