Index: apps/tagcache.c =================================================================== --- apps/tagcache.c (revision 19591) +++ apps/tagcache.c (working copy) @@ -2065,6 +2065,7 @@ struct index_entry idx; int masterfd; int masterfd_pos; + int masterfd_pos_old; struct temp_file_entry *entrybuf = (struct temp_file_entry *)tempbuf; int max_entries; int entries_processed = 0; @@ -2079,9 +2080,10 @@ if ( (masterfd = open_master_fd(&tcmh, true)) < 0) return false; + masterfd_pos_old = lseek(masterfd, 0, SEEK_CUR); masterfd_pos = lseek(masterfd, tcmh.tch.entry_count * sizeof(struct index_entry), SEEK_CUR); - if (masterfd_pos == filesize(masterfd)) + if (masterfd_pos == masterfd_pos_old && tcmh.tch.entry_count != 0) { logf("we can't append!"); close(masterfd); @@ -2824,12 +2826,7 @@ } if (tch.entry_count == 0) - { logf("nothing to commit"); - close(tmpfd); - remove(TAGCACHE_FILE_TEMP); - return true; - } #ifdef HAVE_EEPROM_SETTINGS remove(TAGCACHE_STATEFILE);