Text app does not detect changed files on external ressources

未关闭
#9,236 4 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
javascript, nodejs
领域
backend, databases

调研方向

The issue involves external storage handling and caching in the Nextcloud Text app. Look at the filesystem abstraction layer and how file timestamps are compared. Check the caching mechanism in the text editor component, likely in Vue files. Start by examining the external storage integration and the conflict detection logic that used to work. Running the reproduction steps locally will help identify where the cache is not invalidated.

由索引模型根据 Issue 内容生成。

描述

bug

Describe the bug
Nextcloud text does not detect changes to files in the filesystem. Overwrites changed files with stale content.

To Reproduce
Steps to reproduce the behavior:

  1. Add an external to nextcloud
  2. create file test.md on the external storage
  3. open test.md in nextcloud
  4. add text "nexlcoudcontent" to the file via nextcloud text
  5. open test.md outside of nextcloud, where the external(!) storage is primarily used
  6. change text to "externalcontent" in the file via some external resource
  7. open test.md in nextcloud
  8. content of the file is still "nextcloudcontent"
  9. change content to "stillnextcloudcontent"
  10. safe the file in nextcloud
  11. there is NO conflict, the real filesystem content is ignored and overwritten

Even the following is possible:

  1. Add an external to nextcloud
  2. create file test.md on the external storage
  3. open test.md in nextcloud
  4. add text "nexlcoudcontent" to the file via nextcloud text
  5. open test.md outside of nextcloud, where the external(!) storage is primarily used
  6. change text to "externalcontent" in the file via some external resource
  7. open test.md in nextcloud
  8. content of the file is still "nextcloudcontent"
  9. rename the file to test.txt within nextcloud
  10. open test.txt in nextcloud
  11. content of the file is "externalcontent" now
  12. rename the file back to test.md
  13. open test.md in nextcloud
  14. content of the file changes back to "nextcloudcontent"

even running "occ files:scan" in between does not make any difference. Even if "occ files:scan" does detect the changed file, the integrated nextcloud text editor still uses its outdated cache.

Expected behavior
Nextcloud should always(!) check if the file on the filesystem has changed and should deny to use other sources if the file has changed
At least it should use a timestamp within its non-filesystem-cache for cached files and should compare these when writing: if the timestamp in the non-filesystem-cache and the timestamp of the file in the filesystem are different, then obviously some external change was made to the file; in this nextcloud should deny overwriting the file and instead show a conflict warning!

Silently overwriting changed files on external(!) storage is fatal!

This already worked in the past. I'm using this for some time and in the past a conflict was shown. This has gone with one of the last updates. So this is a serious regression.

Screenshots
n/a

Server details:

  • Nextcloud version: from Version 34.0.x on, currently using 35.0.0
  • PHP Version: 8.4
  • Database: MariaDB 11.8.6
  • OS: Debian 13

Client details:

  • OS: several (Linux, Windows, Android)
  • Browser: several (Firefox, Chrome, Android App)
  • Browser version: n/a
  • Device: n/a
主要语言
JavaScript
星标
665
派生
133
平均合并
1 天 17 小时
30 天内合并 PR
172

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nextcloud/text 的其他 Issue

查看 nextcloud/text 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。