Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The following steps end up in an error page:
1. Open admin/config/development/import
2. Choose a file that is not a *.tar file.
3. Hit upload.
The following error is thrown:
Exception: Invalid checksum for file "somefile.txt" : 24385 calculated, 262720 expected in Drupal\Component\Archiver\ArchiveTar->_error() (line 637 of /home/juampy/projects/drupal8/core/lib/Drupal/Component/Archiver/ArchiveTar.php).
The website has encountered an error. Please try again later.
Comments
Comment #1
juampynr CreditAttribution: juampynr commentedHere is a patch that adds a test but fails and another one which catches the exception and sets an error in the form.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentednice! more of my sloppy being cleaned up.
perhaps we should unlink the file either way? otherwise, this looks ready.
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedhmmm, ignore #2, we don't copy the file anywhere permanent, so no need to mess with the unlink. juampy++
Comment #4
juampynr CreditAttribution: juampynr commentedReviewed the logic again. Unlinking the file even when there is an exception makes total sense. Thanks @beejeebus.
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedok, this looks ready to go.
Comment #7
alexpottCommitted 7b3bf57 and pushed to 8.x. Thanks!