I think you don't need / want this `error = -1;` - the error returned from `_cp_r_mkdir` should be correct and useful.