From d6e9c4eec07c3fe1717d2509d4367005ad0d49ce Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Mon, 14 Jul 2008 09:00:11 +0000 Subject: [PATCH] Stay on the safe side: prevent filename clashing. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25599 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/CutAndPaste.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index eb70bb8e1e..79f81f29fb 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -366,7 +366,8 @@ void putClipboard(ParagraphList const & paragraphs, // a DocumentClass, via new, that is never deleted. If we were to go to // some kind of garbage collection there, or a shared_ptr, then this // would not be needed. - static Buffer * buffer = theBufferList().newBuffer(""); + static Buffer * buffer = theBufferList().newBuffer( + FileName::tempName().absFilename()); buffer->setUnnamed(true); buffer->paragraphs() = paragraphs; buffer->params().setDocumentClass(docclass);