[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sal/osl
Armin Le Grand (Allotropia) (via logerrit)
logerrit at kemper.freedesktop.org
Tue May 18 13:27:11 UTC 2021
sal/osl/w32/file.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 4a75df6d31ac6362957104f976c05e7c425cdc50
Author: Armin Le Grand (Allotropia) <Armin.Le.Grand at me.com>
AuthorDate: Tue Mar 9 19:53:25 2021 +0100
Commit: Thorsten Behrens <thorsten.behrens at allotropia.de>
CommitDate: Tue May 18 15:26:37 2021 +0200
tdf#126742 make Windows file handling more unx-like
The bug mentioned happens due to a system-dependent
difference: Unx-systems allow files to be opened for
write multiple times while our windows implementation
until now did prevent that.
For that reason an embedded OLE which is still opened
in the same LO instance behaves wrong/strange - the
e.g. changed size cannot be written (to the file).
Since we already have unx-like handling and in that
scenario useful sync has to be done anyways, no new
scenario will be created. Only Windows implemenation
will change to behave closer to unx-like behaviour,
I already test-built that on gerrit to make sure all
tests for Windows work as before.
I thought about this for quite some time, but see no
too big risk. For thoughts/discussion please refer
to the task.
Change-Id: I8dbfd70c2f69d0a013f445e152e597f37fa6ecc7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112237
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand at me.com>
(cherry picked from commit 2b4cd99d3360ccffb9829a02412824864d045753)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112428
Tested-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
diff --git a/sal/osl/w32/file.cxx b/sal/osl/w32/file.cxx
index c39c2f16c860..045fd3c248d3 100644
--- a/sal/osl/w32/file.cxx
+++ b/sal/osl/w32/file.cxx
@@ -645,15 +645,15 @@ oslFileError SAL_CALL osl_openFile(
if (result != osl_File_E_None)
return result;
- DWORD dwAccess = GENERIC_READ, dwShare = FILE_SHARE_READ, dwCreation = 0;
+ // tdf126742 use FILE_SHARE_WRITE to get closer to non-Windows plattform behavoiur,
+ // for details and discussion see task please
+ DWORD dwAccess = GENERIC_READ, dwShare = FILE_SHARE_READ | FILE_SHARE_WRITE, dwCreation = 0;
if (uFlags & osl_File_OpenFlag_Write)
dwAccess |= GENERIC_WRITE;
- else
- dwShare |= FILE_SHARE_WRITE;
if (uFlags & osl_File_OpenFlag_NoLock)
- dwShare |= FILE_SHARE_WRITE | FILE_SHARE_DELETE;
+ dwShare |= FILE_SHARE_DELETE;
if (uFlags & osl_File_OpenFlag_Create)
dwCreation |= CREATE_NEW;
More information about the Libreoffice-commits
mailing list