[Libreoffice-commits] core.git: Branch 'libreoffice-4-1-0' - linguistic/source
Michael Stahl
mstahl at redhat.com
Mon Jul 8 01:56:47 PDT 2013
linguistic/source/dicimp.cxx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 633736f40f7e6a58d691875b2e52d9a5e8140113
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Jul 5 00:07:43 2013 +0200
fdo#66420: fix user dictionaries on Windows
28300209604ee1bb8e5050322b29e95a07f679d8 added yet another silly temp
file wrapper class, and introduced 2 bugs: the file descriptor is not
closed before renaming it which fails with ERROR_SHARING_VIOLATION
on Win32, and (as a consequence of that) another attempt to save the
dictionary during shutdown fails because SimpleFileAccess cannot be
created and this is not checked.
Change-Id: I7bd3f5d349ed550440a93fe71e3791c9919de3af
(cherry picked from commit d68de5195605bd9236851e0714dd9b03b0f5f3be)
Reviewed-on: https://gerrit.libreoffice.org/4729
Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
(cherry picked from commit 4d1774b3631e4ac93b544c42bd33cb4058a16392)
Reviewed-on: https://gerrit.libreoffice.org/4738
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Michael Meeks <michael.meeks at suse.com>
Tested-by: Michael Meeks <michael.meeks at suse.com>
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index 083f4c5..5af73a8 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -393,7 +393,10 @@ struct TmpDictionary
{
try
{
- mxAccess->kill(maTmpURL);
+ if (mxAccess.is())
+ {
+ mxAccess->kill(maTmpURL);
+ }
}
catch (const uno::Exception &) { }
}
@@ -492,6 +495,8 @@ sal_uLong DictionaryNeo::saveEntries(const OUString &rURL)
break;
}
+ pStream.reset(); // fdo#66420 close streams so Win32 can move the file
+ xStream.clear();
nErr = aTmpDictionary.renameTmpToURL();
//If we are migrating from an older version, then on first successful
More information about the Libreoffice-commits
mailing list