Attached is a patch to fix issues locating the control directory.
There's a comment in the patch which explains a little. I've included so you can read about it quickly:
It is important that checking for the iTunes_Control
directory be done before the iPod_Control directory because
some devices actually have both directories. The iTunes_Control
directory is correct in these cases. This happens for devices
that Apple shipped with the iPod_Control as the control directory
and later switched to iTunes_Control instead. iTunes appears to
remove files from the old iPod_Control directory but leave the
directory structure intact. Finding this empty directory structure
first will result in a failure to find files.
We've noticed that this tends to occur on the first generation iPod Touch after it has gone through a software update. I'm not sure if it affects other devices as well.
Was there any reason behind the the search order before?
> Attached is a patch to fix issues locating the control directory.
The patch makes sense to me, though I'd let the p_mobile directory at
the end (motorola rokr support is probably broken these days anyway).
> We've noticed that this tends to occur on the first generation iPod Touch after it has gone through a software update. I'm not sure if it affects other devices as well.
Do you mean the directory moves from iPod_Control to iTunes_Control
during a software update? I think gtkpod or libgpod sometimes create
an iPod_Control directory on iOS devices when it fails to identifies
them as iOS devices and someone asks libgpod to create the directory
structures on the device.