summaryrefslogtreecommitdiff
path: root/include/tools
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-04-18 00:42:17 +0300
committerStephan Bergmann <sbergman@redhat.com>2018-04-18 09:08:03 +0200
commit642a49e8d3006d000bc6c58def34d4e96764c6cc (patch)
tree898e31dc24bdca980e97dc2139dc235a2dec5c02 /include/tools
parent6f45e696874401a224fa6c3c6b299933b3ae793f (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>
Diffstat (limited to 'include/tools')
-rw-r--r--include/tools/fileutil.hxx27
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 http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_TOOLS_FILEUTIL_HXX
+#define INCLUDED_TOOLS_FILEUTIL_HXX
+
+#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);
+}
+
+#endif // INCLUDED_TOOLS_FILEUTIL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */