switch (cmd.action) {
case LFUN_UNKNOWN_ACTION:
-#if !defined(HAVE_LIBMYTHES) && !defined(HAVE_LIBAIKSAURUS)
- case LFUN_THESAURUS_ENTRY:
-#endif
flag.unknown(true);
flag.setEnabled(false);
break;
is >> file_name >> row;
Buffer * buf = 0;
bool loaded = false;
- if (prefixIs(file_name, package().temp_dir().absFilename()))
+ string const abstmp = package().temp_dir().absFilename();
+ string const realtmp = package().temp_dir().realPath();
+ if (prefixIs(file_name, abstmp) || prefixIs(file_name, realtmp)) {
// Needed by inverse dvi search. If it is a file
- // in tmpdir, call the apropriated function
+ // in tmpdir, call the apropriated function.
+ // If tmpdir is a symlink, we may have the real
+ // path passed back, so we correct for that.
+ if (!prefixIs(file_name, abstmp))
+ file_name = subst(file_name, realtmp, abstmp);
buf = theBufferList().getBufferFromTmp(file_name);
- else {
+ } else {
// Must replace extension of the file to be .lyx
// and get full path
FileName const s = fileSearch(string(), changeExtension(file_name, ".lyx"), "lyx");
// Either change buffer or load the file
if (theBufferList().exists(s))
buf = theBufferList().getBuffer(s);
- else {
+ else if (s.exists()) {
buf = lyx_view_->loadDocument(s);
loaded = true;
- }
+ } else
+ lyx_view_->message(bformat(
+ _("File does not exist: %1$s"),
+ makeDisplayPath(file_name)));
}
if (!buf) {
case LyXRC::RC_AUTOSAVE:
case LyXRC::RC_AUTO_NUMBER:
case LyXRC::RC_BACKUPDIR_PATH:
+ case LyXRC::RC_BIBTEX_ALTERNATIVES:
case LyXRC::RC_BIBTEX_COMMAND:
case LyXRC::RC_BINDFILE:
case LyXRC::RC_CHECKLASTFILES:
case LyXRC::RC_FONT_ENCODING:
case LyXRC::RC_FORMAT:
case LyXRC::RC_GROUP_LAYOUTS:
+ case LyXRC::RC_INDEX_ALTERNATIVES:
case LyXRC::RC_INDEX_COMMAND:
case LyXRC::RC_JBIBTEX_COMMAND:
case LyXRC::RC_JINDEX_COMMAND: