remove duplicate code, due to an old merge
removed unusued check in rm_path