ankidroid / ankidroid/Anki-Android

Incorrect Handling of Media Filenames

Đang mở
#16,462 13 bình luận 0 reaction 0 người được giao Xem trên GitHub
Keep Open Note Editor Priority-High upstream-issue
Ngôn ngữ chính
Kotlin
Star
11.8k
Fork
2.9k
Merge trung bình
2 ngày 3 giờ
Pull request đã merge (30 ngày)
171

Mô tả

### Checked for duplicates?

- [X] This issue is not a duplicate

### Does it also happen in the desktop version?

- [X] This bug does not occur in the latest version of Anki

### What are the steps to reproduce this bug?

1. Create a long screenshot in Brave for Android (from sharing hub)
2. The resulting file has a filename template that follows this example: chrome_screenshot_May 22, 2024 4_54_13 PM GMT+03_00
3. Add above file to a card
4. Use the media check tool > Image file is deemed unused

### Expected behaviour

The file shouldn't show up in the media check as unused. The check result should be empty (no unreferenced cards).

### Actual behaviour

The file is detected as unreferenced, and isn't included in exports.

### Debug info

```text
AnkiDroid Version = 2.18.0 (464cf290cc77c3f2c562cb03b408b78a13be261b)

Backend Version = 0.1.38-anki24.04.1 (24.04.1 ccd9ca1a8309b80bcb50ddc5d99c7ce63440bce9)

Android Version = 14 (SDK 34)

ProductFlavor = full

Manufacturer = realme

Model = 7 Pro

Hardware = qcom

Webview User Agent = Mozilla/5.0 (Linux; Android 14; 7 Pro Build/UQ1A.240205.004; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/124.0.6367.179 Mobile Safari/537.36

ACRA UUID = e30b1244-b08d-4fdd-ad9a-a898dde99cee

FSRS Enabled = false

Crash Reports Enabled = true
```

### (Optional) Anything else you want to share?

I tried changing the filename to 'chrome' and it worked properly, tried removing spaces and some other characters but it didn't help.

Here's a sample deck (single card) and the media file seperately:
[Deck+Media.zip](https://github.com/ankidroid/Anki-Android/files/15415950/Deck%2BMedia.zip)

### Research

- [X] I am reporting a bug specific to AnkiDroid (Android app)
- [X] I have checked the [manual](https://ankidroid.org/docs/manual.html) and the [FAQ](https://github.com/ankidroid/Anki-Android/wiki/FAQ) and could not find a solution to my issue
- [X] (Optional) I have confirmed the issue is not resolved in the latest alpha release ([instructions](https://docs.ankidroid.org/manual.html#betaTesting))

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

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

Đánh giá

Issue này chưa được đánh giá.

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.