]> git.lyx.org Git - lyx.git/blobdiff - src/bufferlist.C
don't rm emergency saves ever
[lyx.git] / src / bufferlist.C
index 31f59ba57279c2346df8fb81c5afea631ba99f1b..8d7e790294720af072b341a8f6afe258f6c62a2d 100644 (file)
@@ -376,9 +376,6 @@ Buffer * BufferList::readFile(string const & s, bool ronly)
                                // emergency file.
                                b->markDirty();
                                use_emergency = true;
-                       } else {
-                               // Here, we should delete the emergency save
-                               lyx::unlink(e);
                        }
                }
        }
@@ -485,11 +482,11 @@ Buffer * BufferList::newFile(string const & name, string tname, bool isNamed)
 #endif
                        Alert::error(_("Could not read template"), text);
                        // no template, start with empty buffer
-                       b->paragraphs.set(new Paragraph);
+                       b->paragraphs.push_back(new Paragraph);
                        b->paragraphs.begin()->layout(b->params.getLyXTextClass().defaultLayout());
                }
        } else {  // start with empty buffer
-               b->paragraphs.set(new Paragraph);
+               b->paragraphs.push_back(new Paragraph);
                b->paragraphs.begin()->layout(b->params.getLyXTextClass().defaultLayout());
        }
 
@@ -500,7 +497,7 @@ Buffer * BufferList::newFile(string const & name, string tname, bool isNamed)
 
        b->setReadonly(false);
        b->updateDocLang(b->params.language);
-       
+
        return b;
 }