prevent infinite loop in libarchive