lyx2lyx error not as informative when opening newer file

Scott Kostyshak skostysh at lyx.org
Sun Dec 11 15:49:23 UTC 2022


On Sun, Dec 11, 2022 at 12:13:28PM +0100, Enrico Forestieri wrote:
> On Sun, Dec 11, 2022 at 12:06:34AM +0100, Yuriy Skalko wrote:
> > 
> > And opening such file with non-existing version in LyX (master, Win10)
> > gives that old message:
> > 
> > <file> is from a newer version of LyX and the lyx2lyx script failed to
> > convert it.
> 
> Yes, this is true for the Windows version. The problem with posix systems is
> that the return value of runCommand() is wrong. The man page of pclose()
> says that
> 
>     pclose returns -1 if the stream was not created by popen or if the
> application used wait or similar to steal the status; otherwise it
> returns the exit status of the child which can be interpreted in the
> same manner as a status obtained by waitpid
> 
> So, the correct check for success is "WEXITSTATUS(pret) == 0" and not "pret
> == -1". I am going to commit this fix.

Thanks, Enrico. Tested and works well here!

Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20221211/126dd057/attachment.asc>


More information about the lyx-devel mailing list