Re: Error: file name for OPEN is too long
- Posted by Robert Craig <rds at Ra??dEuphoria.com> Dec 20, 2007
- 499 views
Matt Lewis wrote: > Juergen Luethje wrote: > > Matt Lewis wrote: > > > It seems reasonable to pick these values up from the platform correct > > > headers. > > > > > > Matt > > > > I agree. > > Also, wouldn't it be better when Eu returns -1 (or maybe -2 ?), when > > a path/file name is too long, rather than causing the program to crash? > > For my program that crashed a few days ago, I'll write a wrapper for > > open() with this behaviour. > > That makes a lot of sense to me. I didn't even really notice the RTFatal > call there. Perhaps Rob can chime in (if he remembers) about why it's > a fatal error rather than a failed open? I don't remember exactly. I guess back in the old 8.3 file name era the idea of a path greater than 250 or so characters seemed very weird, so I may have thought that it must be a bug in the user's program that he would want reported to him. Feel free to change it. > And since we have information about why the file failed, it does make sense > to report this. The only issue is that we will break code that tests: > }}} <eucode> > if fn = -1 then > </eucode> {{{ I have a lot of code that tests for -1. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com