fixed copy resources for directories