nextcloud / nextcloud/desktop

1 Minute Delay for Office Lock File Creation Call

Open
#8,861 4 comments 5 reactions 1 assignee Claimed by @i2h3 View on GitHub
feature: :file_folder: file provider os: :apple: macOS
Dominant language
C++
Stars
3.9k
Forks
1k
Avg merge
1d 21h
Merged PRs (30d)
127

Description

## Problem

- When creating or editing a document in a file provider domain, the editing apps usually create a lock file in the same directory like Microsoft Office or LibreOffice do as soon as the document is opened.
- Our file provider extension receives the `createItem()` call regularly with an exact one minute delay after its creation.
- However, _sometimes_ this delay does not happen. 😵‍💫

## Progress

- I failed to reproduce this with Apple's official sample code where the call is placed immediately by the system. This proves that it must be a problem of our code and not the file provider framework itself. I originally intended to report it to Apple and ask for feedback in hope there might be some special handling of lock files in the file provider framework itself which explains this.
- @Rello reproduced this with Microsoft Office on iCloud Drive. So we need to keep in mind that this might be not on us after all. Maybe the Apple file provider framework does its own special handling of office lock files.

## Notes

- From my experience with file provider extensions so far, the occurrence of such a delay is something I have not observed yet in the past. Item creations always result in instant calls on the extension object.
- I assume there is some concurrency issue with a timeout. The exact 60 seconds delay is very suspicious.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.