elementary / elementary/code

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

Đang mở
#1,818 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Vala
Star
521
Fork
118
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
14

Mô tả

### 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_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start with Document.vala around line 1356, where the unmounted folder warning is logged, and trace the Save Duplicate path to the scratch_services_document_save_as_co assertion in the report. Reproduce the unmounted-device workflow and verify that Save Duplicate allows the changed document to be saved elsewhere without showing the dialog again.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Lĩnh vực
desktop
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
65/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.