only copy static files if the directory is non-empty.