Revision cf00dba0 lib/utils/io.py

b/lib/utils/io.py
502 502
  if not IsNormAbsPath(result):
503 503
    raise ValueError("Invalid parameters to PathJoin: '%s'" % str(args))
504 504
  # check that we're still under the original prefix
505
  prefix = os.path.commonprefix([root, result])
506
  if prefix != root:
505
  if not IsBelowDir(root, result):
507 506
    raise ValueError("Error: path joining resulted in different prefix"
508
                     " (%s != %s)" % (prefix, root))
507
                     " (%s != %s)" % (result, root))
509 508
  return result
510 509

  
511 510

  

Also available in: Unified diff