Fixed bug in File.expand_path() on Windows (forever recursive loop)

This commit is contained in:
Paolo Bosetti
2014-03-07 16:47:18 +01:00
parent 7ff049457f
commit 39bd240116
+1 -1
View File
@@ -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)