Verify that file path is absolute or relative

This commit is contained in:
Kevin Sawicki
2014-10-09 13:31:50 -07:00
parent 3e3de50eb3
commit 6e1bdbbed7

View File

@@ -87,6 +87,7 @@ satisfies = (version, rawRange) ->
resolveFilePath = (relativePath, parentModule) ->
return unless relativePath
return unless parentModule?.id
return unless relativePath[0] is '.' or fs.isAbsolute(relativePath)
return if relativePath[relativePath.length - 1] is '/'
resolvedPath = path.resolve(path.dirname(parentModule.id), relativePath)