diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-12-04 10:00:51 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-06-18 13:58:13 +0200 |
commit | 8f1ecdc9e874de1e49f6a47789bb0cceeea1221b (patch) | |
tree | e34ee924991d89dbf14d87d0dba921df91724e6c /sal | |
parent | 910c02e2b921ca82d268611022415f1c2bbb9df4 (diff) |
tdf#34171: check foreign lockfiles to tell who has locked document
MS Office (Word/Excel/PowerPoint) lockfiles are supported now.
Note that Excel does *not* create lockfiles for pre-OOXML files.
This changes osl_openFile implementation on Windows, to treat
osl_File_OpenFlag_NoLock to also include FILE_SHARE_DELETE flag
for CreateFileW. This is required to allow opening files created
with FILE_FLAG_DELETE_ON_CLOSE flag, such as Excel's owner files.
The shange should be consistent with the overall meaning of the
osl_File_OpenFlag_NoLock to not impose any locking constraints
to the file being opened.
Change-Id: I7b99012f4bd60ab3821fb91d5166a286031b7e93
Reviewed-on: https://gerrit.libreoffice.org/64496
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 607b80ca3cddc239a35580470944a438ce144fc8)
Reviewed-on: https://gerrit.libreoffice.org/74259
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/w32/file.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sal/osl/w32/file.cxx b/sal/osl/w32/file.cxx index 1bc898eba4e4..0c3f3d9621fe 100644 --- a/sal/osl/w32/file.cxx +++ b/sal/osl/w32/file.cxx @@ -653,7 +653,7 @@ oslFileError SAL_CALL osl_openFile( dwShare |= FILE_SHARE_WRITE; if (uFlags & osl_File_OpenFlag_NoLock) - dwShare |= FILE_SHARE_WRITE; + dwShare |= FILE_SHARE_WRITE | FILE_SHARE_DELETE; if (uFlags & osl_File_OpenFlag_Create) dwCreation |= CREATE_NEW; |