]> git.lyx.org Git - features.git/commitdiff
fix assert with broken symlinks on buffer-open; fix bug #104 crash with --export...
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 13 Jan 2002 23:00:15 +0000 (23:00 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 13 Jan 2002 23:00:15 +0000 (23:00 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3362 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/xforms/ChangeLog
src/frontends/xforms/FormFiledialog.C
src/insets/ChangeLog
src/insets/insetgraphics.C

index 4a87551740f2fdca45eceba343931efca5f0219f..68e23615d67159de452aca1dc4895bcc56d4f28f 100644 (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
index 0b4037da3821c95e80083b3743abff67878486a9..95a4701b88b4276016bf8a305cd48f18f6420e3a 100644 (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;
                        }
                }
 
index f5300b8cd3fa5c9745146524b8f895ec0476c6f0..004725dce17046a82dbe7f7cc786c91a276210ce 100644 (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
 
index b4f7f7cd5ea4255c4f5d571a557725c3b0ba559f..9b081b1fa32ef8f5896602eda5e27126ecf1463c 100644 (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);
        }