Filesize() Function
Brian K. White
bw.aljex at gmail.com
Wed May 13 11:05:00 PDT 2020
Sent that a while ago but it just never showed up... we may end up
getting 3 copies as I tried resending, also from a different address.
--
bkw
Don't worry I'm not actually saying to bother with all that because
probably you can find out the real problem easier.
> You CAN tell what the return value means from open() for sure.
>
> So just test aa before using it.
>
> If: aa < "0"
> Then: errorbox "Failed to open \""{fn"\"\nReason:"<aa
>
> If the open() failed, then you'll get the errorbox and a negative number.
>
> take the negative value, ignore the negative and match the number from:
> /usr/include/asm-generic/errno-base.h
> and
> /usr/include/asm-generic/errno.h
>
> Or here is a more convenient table:
> https://www.thegeekstuff.com/2010/10/linux-error-codes/
>
> Hopefully, the error from open() is more meaningful than "interrupted
> system call", more like
> "-13" EACCES (permission denied), and then you'll have a clue to work
> with.
>
More information about the Filepro-list
mailing list