RE: Checking file integrity

new topic     » goto parent     » topic index » view thread      » older message » newer message

a
a
a
a
Lines to cheat Topica last glitch...
Rob:
I just tried this approach (comparing reported file size and actual bytes
read) as previously advised to me by Pete Lomax.
However, although I know some file is corrupted because Nero refuses to read
it (it stops with "read error" while trying to copy the CD), my program does
not detect any difference between sizes, so I think some of the bytes read
should be wrong.
Wouldn't be it possible for Euphoria to return an error report in such a
case, for example with a negative number different from -1 (EOF)?
Maybe I'm wrong, but I think the OS has a variable called errno (under C)
that can be accessed by the user. Couldn't it be used to that end?
Regards.

----- Original Message -----
From: Robert Craig <rds at RapidEuphoria.com>
To: EUforum <EUforum at topica.com>
Sent: Monday, April 21, 2003 2:36 AM
Subject: Re: Checking file integrity


> > The attached program tries to verify file integrity.
> > I ran this program on a data CDROM, which I know has errors because Nero
> > stops with "read error" when trying to copy it. However, the program
does
> > not detect
> > any error. Am I doing something wrong?
>
>
> I don't know what you expected to happen.
> Your program seems to just read each file
> until it encounters a -1 (end of file).
> If a file has been corrupted, maybe you will
> get a -1 prematurely. Euphoria itself will never
> report an error. Maybe you should count the number of
> bytes and compare with the size in the dir() entry.
>
> Regards,
>     Rob Craig
>     Rapid Deployment Software
>     http://www.RapidEuphoria.com
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu