http://bugzilla.lyx.org/show_bug.cgi?id=4170

The patch fixes the bug. Please test. We were returning early.

I think it's right to clear the AutosaveFile here even if the buffer wasn't unnamed, but if not please let me know.

Richard

--
==================================================================
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==================================================================
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto

Index: BufferList.cpp
===================================================================
--- BufferList.cpp	(revision 19858)
+++ BufferList.cpp	(working copy)
@@ -226,15 +226,11 @@
 				return false;
 		} else if (!menuWrite(buf))
 			return false;
-		else
-			return false;
 	} else if (ret == 2)
 		return false;
+		
+	removeAutosaveFile(buf->fileName());
 
-	if (buf->isUnnamed()) {
-		removeAutosaveFile(buf->fileName());
-	}
-
 	release(buf);
 	return true;
 }

Reply via email to