lib/chef_fs/config.rb
def format_path(entry)
      server_path = entry.path
      if base_path && server_path[0,base_path.length] == base_path
        if server_path == base_path
          return "."
        elsif server_path[base_path.length,1] == "/"
          return server_path[base_path.length + 1, server_path.length - base_path.length - 1]
        elsif base_path == "/" && server_path[0,1] == "/"
          return server_path[1, server_path.length - 1]
        end
      end
      server_path
    end
def format_path(entry)
      server_path = entry.path
      if base_path && server_path[0,base_path.length] == base_path
        if server_path == base_path
          return "."
        elsif server_path[base_path.length,1] == "/"
          return server_path[base_path.length + 1, server_path.length - base_path.length - 1]
        elsif base_path == "/" && server_path[0,1] == "/"
          return server_path[1, server_path.length - 1]
        end
      end
      server_path
    end
def format_path ( entry ) server_path = entry . path if base_path && server_path [ 0 , base_path . length ] == base_path if server_path == base_path return "." elsif server_path [ base_path . length , 1 ] == "/" return server_path [ base_path . length + 1 , server_path . length - base_path . length - 1 ] elsif base_path == "/" && server_path [ 0 , 1 ] == "/" return server_path [ 1 , server_path . length - 1 ] end end server_path end
Print the given server path, relative to the current directory
Print the given server path relative to the current directory