support patch dirs