summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-04-18 00:42:17 +0300
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2018-05-30 14:24:09 +0200
commit37a462747af2abe6bde371607a965011534cab81 (patch)
treed8489d82be90240ad9811af8512faa28e5bafff3 /sfx2/source
parentbb5ffa6270adce18118d3dee590ce6bf7b71371c (diff)
tdf#116420: Windows: Test if a filepath redirects to a WebDAV resource
In Windows, filesystem redirectors can map WebDAV resources to UNC paths, or to drive-based "local" paths; so a WebDAV URI of the form "http://WebDADServer/root/directory/File.ext" may be accessed using "\\WebDADServer\root\directory\File.ext" or "Z:\directory\File.ext". When using these paths, failure to create a lockfile aside the opened document should not be considered an error; so this patch checks for this. Regression from commit 6ca3b3648e25ae9d4d2d29a0df83349198ec3f5e. Change-Id: I1de55b66447dc91d22b6d2b5b121de96bf32e4ee Reviewed-on: https://gerrit.libreoffice.org/53070 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 642a49e8d3006d000bc6c58def34d4e96764c6cc) Reviewed-on: https://gerrit.libreoffice.org/54925 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/doc/docfile.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 757336c6ac1c..6b5429d8f989 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -66,6 +66,7 @@
#include <com/sun/star/security/DocumentSignatureInformation.hpp>
#include <com/sun/star/security/DocumentDigitalSignatures.hpp>
#include <tools/urlobj.hxx>
+#include <tools/fileutil.hxx>
#include <unotools/configmgr.hxx>
#include <unotools/tempfile.hxx>
#include <comphelper/fileurl.hxx>
@@ -1211,7 +1212,13 @@ void SfxMedium::LockOrigFileOnDemand( bool bLoading, bool bNoUI )
}
catch (const uno::Exception&)
{
- if (bLoading && !bNoUI)
+ if (tools::IsMappedWebDAVPath(GetURLObject()))
+ {
+ // This is a path that redirects to a WebDAV resource;
+ // so failure creating lockfile is not an error here.
+ bResult = true;
+ }
+ else if (bLoading && !bNoUI)
{
bIoErr = true;
ShowLockFileProblemDialog(MessageDlg::LockFileIgnore);