Cross-platform check for absolute filepath.
This commit is contained in:
parent
97e2133282
commit
820c9df1b0
@ -1,4 +1,5 @@
|
||||
require 'fileutils'
|
||||
require 'pathname'
|
||||
|
||||
RealFile = File
|
||||
RealFileUtils = FileUtils
|
||||
@ -240,7 +241,7 @@ module FakeFS
|
||||
end
|
||||
|
||||
def normalize_path(path)
|
||||
if path[0,1] == '/'
|
||||
if Pathname.new(path).absolute?
|
||||
File.expand_path(path)
|
||||
else
|
||||
parts = dir_levels + [path]
|
||||
|
Loading…
Reference in New Issue
Block a user