Bo Peng wrote:
The problem is clear: there is no unique representation of absolute
path under different OS. The absolute file in the test lyx file is

/home/bpeng/blah and its inzip name is LyX.Embed.Abs/home/bpeng/blah.
Under windows, the file is considered as
c:/home/bpeng/blah and its inzip name is
LyX.embed.Abs/c:/home/bpeng/blah, and the embedded file is not found.

The problem can be worse in that a file can be absolute or relative
under different OSs. Under windows, /home/bpeng, which is
c:/home/bpeng under windows, can be relative to c: (if this is the
document directory), but it is absolute under linux. Therefore,
/home/bpeng's inzip name can be after LyX.Embed.Up under windows, and
LyX.Embed.Abs under linux....


Why not using LyX.Embed.X for the drive letter under windows? i.e instead of 'LyX.embed.Abs/c:/home/bpeng/blah' you will use:
'LyX.embed.C/home/bpeng/blah'

Then if you decompress this file under a Unix platform, LyX should try to put the file in '/home/bpeng/blah' and if it is not possible, LyX should not try to be cleverer, it should put the embedded along the .lyx file and warn the user with a message box. If you find this too complicated, just forbid absolute paths in embedded files.


In the end, Joost's suggestion might be the only solution.

I believe this particular problem will be the same with Joost solution.

Abdel.

Reply via email to