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
signature.asc
Description: PGP signature
-- lyx-devel mailing list [email protected] http://lists.lyx.org/mailman/listinfo/lyx-devel
