innobackupex --incremental errors listing directory

Hi,

Using innobackupex 1.6 with an invocation of the form:

innobackupex --no-timestamp
–incremental $INCREMENTAL_DIR
–incremental-basedir $FULL_DIR

I get errors like:


ls: cannot access … : No such file or directory
Use of uninitialized value $inc_dir in scalar chomp at /usr/bin/innobackupex line 1657.

I tracked it down and innobackupex is shelling out to perl to list $INCREMENTAL_DIR which it does not need to do in this case. I believe the errors are harmless, but in the hopes that it might help someone else I’ve attached a patch that worked for me (caveat: not thoroughly tested, use at own risk. etc…)