sync virtual file without opening
- Dominant language
- C++
- Stars
- 3.9k
- Forks
- 1k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 123
Description
### How to use GitHub
* Please use the 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to show that you are interested into the same feature.
* Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
* Subscribe to receive notifications on status change and new comments.
---
## Feature request
**Which Nextcloud Version are you currently using:** 29.0.7
**Describe the solution you'd like**
The ability to initiate sync of file but without opening it.
The current mechanism relies on using `xdg-open` (or `mimeopen`) for opening a file: the `.nextcloud` file extension (on linux) chains through several mime-related files, eventually resolving to using `/usr/bin/nextcloud` on the file. Its behavior is to sync it to the local directory and then open the file. (If you're curious to which files, read https://github.com/nextcloud/desktop/issues/3668#issuecomment-2377036151.)
However, in my use-case I need to open it within the VM, which is certainly not something nextcloud should try to implement. Currently I have to open it in linux, which opens in what linux thinks is the appropriate app (it's insufficient but doesn't crash). I then close the app, then open the file from within the windows-guest VM (with a shared-folder to get to the real file).
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
- `nextcloudcmd` only syncs whole directories, it does not support individual files; even if it did, I'm not certain that it signals that the file is the realization of a virtual file, and therefore not a change. I would not want this to cause an unnecessary false-signal that the newly downloaded is "new" and needs to be uploaded.
- anything using `webdav` falls prey to the same false-signal that the downloaded file is "new" or "changed", which would overwrite the file on the server; at best this is inefficient.
- I have tried to hack a script that "opens" it (using the default `xdg-open`/`mimeopen` mechanism) and immediately close the mime-defined application, but this is just a hack and often doesn't catch it quite in time.
**Additional context**
- It is not unheard of that opening the file imposes some change on its contents, either by accident (such as imperfect MS-Office emulation in LibreOffice/OpenOffice, bug reports almost certainly) or by design (I have no example at this time). In this case, syncing the file is the only thing desired, anything more is irreversible.
- My use-case to open it within a VM is just mine, I think the request is still relevant. For instance, if I'm syncing to the local drive and will then take it to another machine (on which I'm not running a nextcloud desktop client), it might be that the file _cannot_ be run on the local system due to any number of reasons (such as the required software not installed alongside the desktop client).
Contributor guide
Assessment
This issue has not been assessed yet.