> If you go that way, yes. But then it's unclear why you really need to know > the original path, as Jose has been saying. The only possible reason would > be to update from an external file, and there are other ways to do that, > outside of LyX. Moreover, note that if all paths are downward from the > document directory, the whole need to calculate inzipName(), store this in > the insets, etc, evaporates.
I have explained in my reply to Jose about this. The whole inzipName business is used to handle out of tree files. They are simply relative paths otherwise. Anyway, in .lyx file, you do need a way to store whether the file is going to be embedded, using true/false or inzipname/empty in my case. > > I do not "require* anything. > > > Well, the difference seems to me trivial, assuming that we accept what Jose > has been saying, namely, that we do not store absolute paths in the LyX file > and, moreover, that we do not store paths outside the document directory. > (I'm less sure what Jose's view about that is, but that seems a sensible > security precaution, and I think that is his point.) So, if we accept that > much, then: You copy the file to the temporary directory and then bundle it; > I copy it to a subdirectory and bundle it. You don't unbundle unless the > user asks to do so; I do it transparently. I don't see much difference. If I accept that much, I still have to copy files around and modify each and every copies if it needs to be modified. This is exactly the thing I would like to avoid. Basically, I would like to share the same files across different lyx documents. If I do accept that much, we still differ by the embed-editing mode. > Not writing outside the document directory obviously helps. Since I don't > know enough about TeX programming, I ask: If I bundle virus.exe, can I > manage to include TeX code in a .sty file (or even just in the preamble) > that will cause it to be executed? Even if not, I still think allowing the > bundling of virus.exe is a seriously bad idea. This is an issue about > bundling of arbitrary files rather than one about pathnames. This has nothing to do with out of tree files. Your approach also allows embedding those, just as one can pack them in their own zip file. Bo