def prepend_root_dir(opts, path_options):
 root_dir = os.path.abspath(opts['root_dir'])
 root_opt = opts['root_dir'].rstrip(os.sep)
 for path_option in path_options:
  if (path_option in opts):
   path = opts[path_option]
   if ((path == root_opt) or path.startswith((root_opt + os.sep))):
    path = path[len(root_opt):]
   opts[path_option] = salt.utils.path_join(root_dir, path)

def prepend_root_dir ( opts , path_options ) : root_dir = os . path . abspath ( opts [ 'root_dir' ] ) root_opt = opts [ 'root_dir' ] . rstrip ( os . sep ) for path_option in path_options : if ( path_option in opts ) : path = opts [ path_option ] if ( ( path == root_opt ) or path . startswith ( ( root_opt + os . sep ) ) ) : path = path [ len ( root_opt ) : ] opts [ path_option ] = salt . utils . path_join ( root_dir , path )
prepends the options that represent filesystem paths with value of the root_dir option .