path: root/include/tools/fileutil.hxx
diff options
authorMike Kaganski <>2018-04-18 00:42:17 +0300
committerAron Budea <>2018-04-18 15:05:54 +0200
commita4ef8f7646beda733ad926911d0ab7c8ab42f69f (patch)
treeb378a3bb1723d7e0c4499aeb38797a5a21ad6be2 /include/tools/fileutil.hxx
parent978891859ac474adf7eb18389cad175c3db04507 (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: Tested-by: Jenkins <> Reviewed-by: Stephan Bergmann <> (cherry picked from commit 642a49e8d3006d000bc6c58def34d4e96764c6cc) Reviewed-on: Tested-by: Mike Kaganski <> Reviewed-by: Aron Budea <>
Diffstat (limited to 'include/tools/fileutil.hxx')
1 files changed, 27 insertions, 0 deletions
diff --git a/include/tools/fileutil.hxx b/include/tools/fileutil.hxx
new file mode 100644
index 000000000000..06e7bf820992
--- /dev/null
+++ b/include/tools/fileutil.hxx
@@ -0,0 +1,27 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at
+ */
+#include <tools/toolsdllapi.h>
+class INetURLObject;
+namespace tools
+// Tests if the path is a UNC or local (drive-based) path that redirects to
+// a WebDAV resource (e.g., using redirectors on Windows).
+// Currently only implemented for Windows; on other platforms, returns false.
+TOOLS_DLLPUBLIC bool IsMappedWebDAVPath(const INetURLObject& aURL);
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */