summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2013-03-14 20:51:24 +0200
committerTor Lillqvist <tlillqvist@suse.com>2013-03-14 20:57:12 +0200
commit63fb9eef9b9de18495956110096a80700bb8889f (patch)
tree7504f94739e34cd4b7728b37e46afc0eb04a5356 /ucb
parent78716219df74f4eee573c9ae98ea7d05d15d0e5e (diff)
Lock document that is opened for potential modification
Part of fix for bnc#805901. Seems to work, can it really be this simple... Change-Id: Ib00c9a973556724f033f843961425dd611797eed
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/webdav/webdavcontent.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index 88e2d9b77d04..cf966668a285 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -506,6 +506,12 @@ uno::Any SAL_CALL Content::execute(
}
aRet = open( aOpenCommand, Environment );
+#if 1
+ if ( (aOpenCommand.Mode == ucb::OpenMode::DOCUMENT ||
+ aOpenCommand.Mode == ucb::OpenMode::DOCUMENT_SHARE_DENY_WRITE) &&
+ supportsExclusiveWriteLock( Environment ) )
+ lock( Environment );
+#endif
}
else if ( aCommand.Name == "insert" )
{