...because I've just ripped all my hair out.
I wrote my own tar module and it was working perfectly...I went to bed, woke up and now it doesn't work.
Basically when reading the tar it tells me there was a checksum error and then a read error. It will create a new tar and I can open it fine with winrar/winzip so that leads me to believe it isn't corrupt however when trying to read the tar into memory I get the read error.
So either the code is writing a corrupt tar (not sure that is happening) or it isn't reading them properly.
I don't understand why it was working and then suddenly stopped which is probably yanking my chain more so than the error.
I didn't really want to post the code...but hey, needs must.
Any thoughts would be appreciated...it's pretty complexed stuff so peek if you dare.
(I though it would be good to post here though as I always find the error minutes after posting )
It is barfing here in read_tar:
return if $head eq "\0" x 512;
substr($head,148,8) = " ";
unpack("%16C*",$head) != $chksum and warn sprintf($ERRORS->{CHECKSUM}, $name);
# Compressed.
if ($comp) { $compr->gzread($data, $size) }
# Not compressed.
else {
if (CORE::read (TAR, $data, $size) != $size) {
$WO::Tar::error = sprintf($ERRORS->{READERROR}, $file);
return;
}
}
I'm probably asking too much really but hopefully a staff member will pass by.
I wrote my own tar module and it was working perfectly...I went to bed, woke up and now it doesn't work.
Basically when reading the tar it tells me there was a checksum error and then a read error. It will create a new tar and I can open it fine with winrar/winzip so that leads me to believe it isn't corrupt however when trying to read the tar into memory I get the read error.
So either the code is writing a corrupt tar (not sure that is happening) or it isn't reading them properly.
I don't understand why it was working and then suddenly stopped which is probably yanking my chain more so than the error.
I didn't really want to post the code...but hey, needs must.
Any thoughts would be appreciated...it's pretty complexed stuff so peek if you dare.
(I though it would be good to post here though as I always find the error minutes after posting )
It is barfing here in read_tar:
Code:
# End of archive. return if $head eq "\0" x 512;
substr($head,148,8) = " ";
unpack("%16C*",$head) != $chksum and warn sprintf($ERRORS->{CHECKSUM}, $name);
# Compressed.
if ($comp) { $compr->gzread($data, $size) }
# Not compressed.
else {
if (CORE::read (TAR, $data, $size) != $size) {
$WO::Tar::error = sprintf($ERRORS->{READERROR}, $file);
return;
}
}
I'm probably asking too much really but hopefully a staff member will pass by.