duckduckgo / duckduckgo/Android

[Bug] Bookmark export doesn't truncate file on overwriting

Open
#3,069 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs triage
Dominant language
Kotlin
Stars
4.8k
Forks
1.4k
Avg merge
2d 17h
Merged PRs (30d)
170

Description

Describe the bug

When the bookmarks export overwrites an existing HTML file larger than the exported one, the resulting file is not truncated, that is, it contains trailing data from the original file, and its size stays the same.

How to Reproduce
  1. Add some bookmarks to DDG and export them.
  2. Delete half of the bookmarks and export them again to the same file, confirming overwriting.
  3. Observe the size and contents of the file.
Expected behavior

It should truncate/delete the overwritten file on export.

Environment
- DDG App Version: 5.156
- Device: Armor X7
- OS: Android 10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Android bookmark export entry point and reproduce the overwrite case described in the issue. Compare the exported file size and contents before and after exporting fewer bookmarks to the same path. Done means the overwritten HTML file no longer contains trailing data from the previous export.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.