summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPaolo Bosetti <[email protected]>2014-03-07 16:47:18 +0100
committerPaolo Bosetti <[email protected]>2014-03-07 16:47:18 +0100
commit39bd240116b2980f90f9d8f350e18311959db54b (patch)
tree7072f0f19ef8762ae3af6478dad3b35ba67bb858
parent7ff049457f5c0c29ce3aec9414b98ae4226d2377 (diff)
downloadmruby-39bd240116b2980f90f9d8f350e18311959db54b.tar.gz
mruby-39bd240116b2980f90f9d8f350e18311959db54b.zip
Fixed bug in File.expand_path() on Windows (forever recursive loop)
-rw-r--r--mrblib/file.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrblib/file.rb b/mrblib/file.rb
index 9a4333c64..a4fcd3212 100644
--- a/mrblib/file.rb
+++ b/mrblib/file.rb
@@ -64,7 +64,7 @@ class File < IO
def self.expand_path(path, default_dir = '.')
def concat_path(path, base_path)
- if path[0] == "/"
+ if path[0] == "/" || path[1] == ':' # Windows root!
expanded_path = path
elsif path[0] == "~"
if (path[1] == "/" || path[1] == nil)