Automatic File Locking only Working on Specific Filetypes
The desktop client only set locks automatically on a very limited range of file types.
Scenario:
User A opens an .odt and .docx file. User A opens a .pdf, .dwg, or any other file User B tries to open the same files as User A
What happens:
User B can see a lock icon next to the .odt and .docx files, and is presented with a banner to indicate that the file is read only when they attempt to open it. The other files do not have a lock icon, and User B can edit and overwrite the data, leading to sync conflicts.
What should happen / is expected:
User B should see a lock icon next to all files that are currently in use, and should not be able to edit files that are in use.
System Configuration
NextCloud Server Version: 28.0.3 (AIO, Docker) NextCloud Client Version: 3.12.2 Operating System: Windows 11 23H2 Notable Apps: Files Lock, Group Folders
Anyone...?
We are having the same issue
Has anyone tried NextCloud 29? I saw a few reports of people having issues with other things... so I'm not really game to try it.
This is still an issue in NextCloud 29.
Are you using richdocuments (Collabora) or is this about the desktop client?
Desktop client. Sorry I thought that part was self explanatory, you cannot open DWG files in the web interface.
Desktop client. Sorry I thought that part was self explanatory, you cannot open DWG files in the web interface.
I believe you can: https://apps.nextcloud.com/apps/cadviewer
Yes but you cannot edit it from there, it's just a viewer. Either way, the primary issue I am seeing is with opening files within the file explorer in Windows 11.
Any enhancement about that ? We need this feature too, especially for .dwg. Is there any technical challenge ? How does it work with office files, and why couldn't it work the same way for other type of files ?
@tomdereub There are lists of known (Office) file extensions and some general patterns that indicate a lockfile in src/libsync/filesystem.cpp.
depending on how file locking works with .dwg (AutoCAD I suppose?) adding support for that could be to justâ„¢ add another entry there
Ok thanks. So what should be done, if I understand well, is :
- change the check to be able to check suffix and not only prefix. So maybe check on full file name and not juste begin (std::cbegin(lockFilePatterns))
- change the lockFilePatterns list, with something like that
constexpr std::array<const char *, 2> lockFilePatterns = {{".~lock.*", "~$*","*.dwl"}}; - change the officeFileExtensions list adding .dwg (and then the name with office would make no more sense)
- add "*.dwl" to the default exclude list of the client
I'm no dev, so I may misunderstand somethings, and maybe it's not that simple, let me know. It would be interesting too to ask for the community if there are other file types that would be worth adding ?