fix assert with broken symlinks on buffer-open; fix bug #104 crash with --export with new graphics inset

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3362 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2002-01-13 23:00:15 +00:00
parent 96e9048c24
commit 5614c0459a
4 changed files with 19 additions and 5 deletions

View File

@ -1,3 +1,7 @@
2002-01-13 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* FormFiledialog.C (Reread): skip broken symlinks
2002-01-13 Lars Gullik Bjønnes <larsbj@birdstep.com>
* FormMathsMatrix.C (AlignFilter): use std::count and add some

View File

@ -277,8 +277,12 @@ void FileDialog::Private::Reread()
// gets file status
File = AddName(pszDirectory, fname);
// FIXME: we don't get this file exists/stattable
FileInfo fileInfo(File, true);
// can this really happen?
if (!fileInfo.isOK())
continue;
fileInfo.modeString(szMode);
unsigned int nlink = fileInfo.getNumberOfLinks();
string user = lyxUserCache.find(fileInfo.getUid());
@ -323,7 +327,10 @@ void FileDialog::Private::Reread()
// link). Is that intended?
// JV 199902
fileInfo.newFile(File);
Buffer += fileInfo.typeIndicator();
if (fileInfo.isOK())
Buffer += fileInfo.typeIndicator();
else
continue;
}
}

View File

@ -1,5 +1,8 @@
2002-01-13 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* insetgraphics.C (updateInset): do not try to render image if
lyxrc.use_gui is false (bug #104)
* insetinclude.C (loadIfNeeded): do not call bufferlist.readFile
if file does not exist

View File

@ -798,9 +798,9 @@ void InsetGraphics::updateInset() const
// We do it this way so that in the face of some error, we will still
// be in a valid state.
if (!params.filename.empty() &&
lyxrc.display_graphics != "no" &&
params.display != InsetGraphicsParams::NONE) {
if (!params.filename.empty() && lyxrc.use_gui
&& lyxrc.display_graphics != "no"
&& params.display != InsetGraphicsParams::NONE) {
temp = gc.addFile(params.filename);
}