elementary / elementary/code

"Save Duplicate" button does not work after unmounting source device

未关闭
#1,818 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Vala
星标
521
派生
118
平均合并
1 天 8 小时
30 天内合并 PR
14

描述

### What Happened?

While operating Code with "Save files when changed" preference off, a document was loaded from an unmountable source (USB stick). Some changes were made and then the source device unmounted before saving. Code showed a dialog with "Ignore" and "Save Duplicate" buttons. Pressing the latter just resulted in the dialog being shown again.

The only way to save the changes was to duplicate the tab into a new document and save that.

### Steps to Reproduce

1. Turn off "Save files when changed"
2. Open a document on an unmountable device
3. Make some changes
4. Unmount the device
5. Observe dialog and effect of pressing "Save Duplicate"

### Expected Behavior

Pressing "Save Duplicate" allows the changed document to be saved elsewhere.

### OS Version

8.x (Circe)

### OS Architecture

amd64 (on most hardwares)

### Session Type

Secure Session (Wayland, This is the default)

### Software Version

Latest Release

### Log Output

```shell
** (io.elementary.code:5576): WARNING **: 10:44:40.136: Document.vala:1356: Folder containing the file was unmounted

** (io.elementary.code:5576): CRITICAL **: 10:46:40.346: scratch_services_document_save_as_co: assertion '!locked && is_saving' failed
```

### Hardware Info

_No response_

贡献指南

打开贡献指南

调研方向

从 Document.vala 大约第 1356 行开始,那里记录了未挂载文件夹的警告,并跟踪 Save Duplicate 路径,直到报告中的 scratch_services_document_save_as_co 断言。复现未挂载设备的工作流,并验证 Save Duplicate 允许将已更改的文档保存到其他位置,而不会再次显示对话框。

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

评估

领域
desktop
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
65/100

把新 issue 发到你的邮箱

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