From f00a43edc2b94163a7f33bc9e74f68394a06080d Mon Sep 17 00:00:00 2001 From: Andre Duffeck Date: Thu, 18 Jan 2024 12:00:46 +0100 Subject: [PATCH] Apply comment suggestions Co-authored-by: Giuseppe Lo Presti --- src/core/cs3iface.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/cs3iface.py b/src/core/cs3iface.py index 2a983481..12903608 100644 --- a/src/core/cs3iface.py +++ b/src/core/cs3iface.py @@ -474,7 +474,8 @@ def writefile(endpoint, filepath, userid, content, lockmd, islock=False): log.warning(f'msg="Access denied uploading file to Reva" reason="{putres.reason}"') raise IOError(common.ACCESS_ERROR) if putres.status_code != http.client.OK: - if len(content) == 0: # 0-byte file uploads are finalized after the InitiateFileUploadRequest request already + if len(content) == 0: # 0-byte file uploads may have been finalized after the InitiateFileUploadRequest request already, let's assume it's OK + # TODO this use-case is to be reimplemented with a call to `TouchFile`. log.info('msg="0-byte file written successfully" filepath="%s" elapsedTimems="%.1f" islock="%s"' % (filepath, (tend - tstart) * 1000, islock)) return