Skip to content

Commit 6ef0696

Browse files
committed
cs3iface: added back the islock argument to writefile
1 parent c9e9567 commit 6ef0696

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/core/cs3iface.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,16 @@ def readfile(endpoint, filepath, userid, lockid):
147147
yield chunk
148148

149149

150-
def writefile(endpoint, filepath, userid, content, size, lockmd, noversion=False):
150+
def writefile(endpoint, filepath, userid, content, size, lockmd, islock=False, noversion=False):
151151
"""Write a file using the given userid as access token. The entire content is written
152152
and any pre-existing file is deleted (or moved to the previous version if noversion=False).
153153
The islock flag is currently not supported. The backend should at least support
154154
writing the file with O_CREAT|O_EXCL flags to prevent races."""
155155
app_name = lock_id = ''
156156
if lockmd:
157157
app_name, lock_id = lockmd
158+
if islock:
159+
log.warning('msg="islock flag not supported for CS3 storage" filepath="%s"' % filepath)
158160
resource = Resource.from_file_ref_and_endpoint(filepath, endpoint)
159161
client.file.write_file(Auth.check_token(userid), resource, content, size,
160162
app_name, lock_id, disable_versioning=noversion)

0 commit comments

Comments
 (0)