Skip to content

Commit 2c1feb4

Browse files
committed
Fixed relock workflow of CodiMD
This logic was added to better support versioning, but it breaks the case of unlocking and relocking of CodiMD. Therefore we remove it for now and will see whether to introduce an additional xattr or stay as is for the versioning logic.
1 parent 7720306 commit 2c1feb4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/core/wopi.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,7 @@ def unlock(fileid, reqheaders, acctok):
317317
# validate that the underlying file is still there
318318
statInfo = st.statx(acctok['endpoint'], acctok['filename'], acctok['userid'])
319319
st.unlock(acctok['endpoint'], acctok['filename'], acctok['userid'], acctok['appname'], utils.encodeLock(lock))
320-
# and remove the lastwritetime xattr, so next time the file is opened we go for a new version
321-
st.rmxattr(acctok['endpoint'], acctok['filename'], acctok['userid'], utils.LASTSAVETIMEKEY, None)
320+
# note we leave the lastwritetime xattr, as it may be useful for RefreshLock with X-WOPI-ValidateTarget headers
322321
except IOError as e:
323322
if common.ENOENT_MSG in str(e):
324323
return utils.createJsonResponse({'message': 'File not found'}, http.client.NOT_FOUND)

0 commit comments

Comments
 (0)