Skip to content

prefs/directories: surface that the Incoming folder is shared (#601) - #631

Merged
mrjimenez merged 1 commit into
amule-project:masterfrom
got3nks:feat/prefs-incoming-shared-hint
May 16, 2026
Merged

prefs/directories: surface that the Incoming folder is shared (#601)#631
mrjimenez merged 1 commit into
amule-project:masterfrom
got3nks:feat/prefs-incoming-shared-hint

Conversation

@got3nks

@got3nks got3nks commented May 16, 2026

Copy link
Copy Markdown
Contributor

Summary

The "Destination folder for downloads" field in the Preferences → Directories tab gave no UI cue that completed downloads in that folder are automatically shared with other peers (over both ed2k and Kad). @slrslr's report in #601 frames it as "I picked a download destination, I did not pick to share that folder's contents" — a fair read of the panel as it stood. Users who reuse their system-wide ~/Downloads directory had no signal that doing so would expose every other file in it.

Fix

Three small UI cues added to the same StaticBox, no behaviour change:

  1. Tooltip on the path field explaining that contents land here AND get shared, with a hint to use an aMule-only sub-folder if the destination also holds private files.
  2. Same-text tooltip on the Browse button so the cue is on the most-clicked control too.
  3. Visible static-text hint label beneath the field: (Files in this folder are shared with other peers), mirroring the existing (Right click on folder icon for recursive share) hint pattern in the Shared folders panel right below it.

The hint is a localised string, picks up translation alongside the other panel labels.

Layout (after)

┌─ Destination folder for downloads ──────────────────────┐
│  /home/user/Downloads                       [ Browse ]  │
└─────────────────────────────────────────────────────────┘
       (Files in this folder are shared with other peers)

┌─ Folder for temporary download files ───────────────────┐
│  /home/user/.aMule/Temp                     [ Browse ]  │
└─────────────────────────────────────────────────────────┘

Validation

macOS arm64: monolithic amule rebuilds clean. Hint placement mirrors the existing wxStaticText pattern in the same panel (muuli_wdr.cpp:1574) so the layout machinery is exercised by code that already works.

Closes #601.

@danim7

danim7 commented May 16, 2026

Copy link
Copy Markdown
Contributor

I was thinking on the same approach.
Concerning the wording in the layout, maybe add the word "All" to make it perfectly clear.

"All files in this folder are shared with other peers"

…project#601)

The "Destination folder for downloads" field in the Preferences
Directories tab gave no UI cue that completed downloads in that
folder are automatically shared with ed2k peers. Users who reused
their system-wide ~/Downloads directory ended up sharing personal
files they had no intention of exposing -- see slrslr's report in
amule-project#601 where the framing is essentially "I picked a download
destination, I did not pick to share that folder's contents."

Add three small UI cues to the same StaticBox so the sharing
contract is visible without changing behaviour:

  * Tooltip on the path field explaining that contents land here
    AND get shared, with a hint to use an aMule-only sub-folder
    if the destination also holds private files.

  * Same-text tooltip on the Browse button so the cue is on the
    most-clicked control too.

  * A visible static-text label "(Files in this folder are shared
    with ed2k peers)" beneath the field, mirroring the existing
    "(Right click on folder icon for recursive share)" hint
    pattern in the Shared folders panel right below it.

Verified locally on macOS arm64: monolithic amule rebuilds clean.

Reported by slrslr.
@got3nks
got3nks force-pushed the feat/prefs-incoming-shared-hint branch from b6d4a21 to fded4df Compare May 16, 2026 07:48
@got3nks

got3nks commented May 16, 2026

Copy link
Copy Markdown
Contributor Author

Good call, applied — "All" added to all three strings to make the "every file in there, not just downloads" point unambiguous:

  • Static label: (All files in this folder are shared with other peers)
  • Field tooltip: Completed downloads are stored here. All files in this folder are automatically shared with other peers. / If this folder also holds files you don't want to share, point it at an aMule-only sub-folder.
  • Browse button tooltip: Pick the folder where completed downloads will be stored. All files in that folder will be shared with other peers.

Force-pushed (fded4df84).

@mrjimenez
mrjimenez merged commit 74871be into amule-project:master May 16, 2026
12 checks passed
@got3nks
got3nks deleted the feat/prefs-incoming-shared-hint branch May 16, 2026 16:01
ngosang pushed a commit to ngosang/amule that referenced this pull request Jul 27, 2026
…ject#647)

Fixes amule-project#631. Opening a collection from a file manager has never worked on any platform: nothing declared the type to the OS, nothing handled the open-document event on macOS, and the command-line path rejected anything that was not an eD2k or magnet link.

Accepts a .emulecollection path or file:// URL as an argument, handles MacOpenFiles on macOS, and declares the type to each OS. Registration is exposed on the same four surfaces as the URL schemes so a portable copy can register itself; UriScheme becomes HandlerTarget so the existing policy layer and the Linux mimeapps.list handling are reused rather than duplicated.

Hardens CMuleCollection, which becomes reachable from arbitrary files: a blank line threw std::out_of_range out of Open(), a length prefix could request a 4 GiB allocation, a filename containing a newline forged extra lines in the ED2KLinks IPC file, an entry without a hash produced an unusable link, a link smuggled into a filename was harvested by the text parser after the binary parser rejected it, and a UTF-8 BOM made a collection parse as empty. Adds unit tests, which the parser had none of.

Also fixes pre-existing bugs this feature was the first to depend on: wxExecute's string form passed quote characters through to the XDG cache helpers, those helpers inherited the AppImage's LD_LIBRARY_PATH and died on a bundled glib symbol, mimeapps.list was written without a trailing newline so the next writer's entry fused onto ours, and four installer strings were never extractable by xgettext.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature idea] Avoid accidental sharing of a main computer Downloads folder contents (require user to always confirm sharing)

3 participants