Abdelrazak Younes wrote: > OK then, IIUC, the attached patch is correct for all use-cases: > > 1) if a bib file is found in the same directory of the lyx file, this is > the one. > > 2) if not look in the cache. > > 3) if not in the cache, look for it with kpsewhich.
Now you duplicated partly what findtexfile does. Not good IMHO. > In practice, this means that we cache only files that are in the texmf > tree and there is no room for confusion. Not good. We should cache all files. This makes the code simpler. > As an added bonus, the patch also avoid the use of 'Path'. At the cost of duplicated code. I prefer using Path and one utility function over not using Path but duplicating the code. > By the way, is it normal that we don't allow bib files outside the texmf > tree or along the lyx file? As Jürgen already said: We allow them. If the dialog would not allow to add them then that would be a different bug, but in fact that works here. The dialog is only clever: It strips the path if the file is in the same directory as the document. It does not do so if it is somehere completely else, and you give the absolute path. We do this for all included files BTW, and it makes sense: Usually if I include files in the same directory or a subdirectory I want relative paths, because I can then transfer the whole document easily. Georg