Addressing Matthieu's concern. Now it prints a warning message. Also does a rename before the rm.
Derek --- orig/libarch/libraries.c +++ mod/libarch/libraries.c @@ -314,10 +314,21 @@ { if (check_inode_sigs) { if (!arch_valid_inode_sig (rel_peek_str (revision_dirs, 0, 0), archive, revision)) - { - safe_printfmt (2, "corrupt library (failed inode signature validation)\n archive: %s\n revision: %s\nYou should remove this revision from your library.\n", - archive, revision); - exit (2); + { + t_uchar * junk_dir = str_save(0, rel_peek_str (revision_dirs, 0, 0)); + t_uchar * dest_dir_dir = file_name_directory_file (0, junk_dir); + t_uchar * tmp_dir = 0; + + safe_printfmt (2, "tla: corrupt library (failed inode signature validation) archive: %s revision: %s. \nAutomatically removed.\n", archive, revision); + ensure_directory_exists (dest_dir_dir); + tmp_dir = tmp_file_name (dest_dir_dir, ",,to-be-deleted"); + safe_rename (junk_dir, tmp_dir); + rmrf_file(tmp_dir); + + lim_free (0, dest_dir_dir); + lim_free (0, tmp_dir); + lim_free (0, junk_dir); + continue; } } answer = str_save (0, rel_peek_str (revision_dirs, 0, 0)); _______________________________________________ Gnu-arch-users mailing list Gnu-arch-users@gnu.org http://lists.gnu.org/mailman/listinfo/gnu-arch-users GNU arch home page: http://savannah.gnu.org/projects/gnu-arch/