Hi all, I have a weird problem here that's really been screwing up a bunch of build processes.
I have a script that goes through a directory, and runs another script from it to create a modified file for each of the original, then a second call to the script (but a different function in the script) reopens the fire and stamps it with a CRC. Problem is that OCCASIONALLY one byte gets truncated from the end of the file and the stamping fails becauseo f this. I would say it happens in one of 100 files. I created a function to check when it happens (it just checks the file size_ and it appears to happen RIGHT after this call
Before we even do any reads/writes. basically I have
This script is running on a windows (xp) box. Anyone seen something like this?
Thanks,
G
I have a script that goes through a directory, and runs another script from it to create a modified file for each of the original, then a second call to the script (but a different function in the script) reopens the fire and stamps it with a CRC. Problem is that OCCASIONALLY one byte gets truncated from the end of the file and the stamping fails becauseo f this. I would say it happens in one of 100 files. I created a function to check when it happens (it just checks the file size_ and it appears to happen RIGHT after this call
Code:
unless( open( OUT_FILE, "<$file" ) ) {
Before we even do any reads/writes. basically I have
Code:
CheckFileSize($file); #File is fine here
unless( open( OUT_FILE, "<$file" ) ) {
print "generic error msg\n";
}
binmode( OUT_FILE );
CheckFileSize($file); # File is busted here
This script is running on a windows (xp) box. Anyone seen something like this?
Thanks,
G