mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
(copyFileToDir): ensure temp files have unique names.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7139 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
445ae0da6f
commit
8dea72a38c
@ -1,3 +1,6 @@
|
||||
2003-06-10 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* filetools.C (copyFileToDir): ensure that temp files have unique names.
|
||||
|
||||
2003-06-04 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
|
@ -1337,6 +1337,9 @@ string copyFileToDir(string const & path, string const & file_in)
|
||||
file_out = subst(file_out, "/", "_");
|
||||
// Replace '.' in the file name with '_'
|
||||
file_out = subst(file_out, ".", "_");
|
||||
// Append a unique ID
|
||||
static int id;
|
||||
file_out += '_' + tostr(id++);
|
||||
// Add the extension back on
|
||||
file_out = ChangeExtension(file_out, GetExtension(file_in));
|
||||
// Put this file in the buffer's temp dir
|
||||
|
Loading…
Reference in New Issue
Block a user