clean code.
fix bug of dir_search_name().