Skip to content

feat: add "Follow symbolic links in shared folders" preference - #809

Merged
mrjimenez merged 2 commits into
amule-project:masterfrom
got3nks:feat/symlink-share-option
Jun 1, 2026
Merged

feat: add "Follow symbolic links in shared folders" preference#809
mrjimenez merged 2 commits into
amule-project:masterfrom
got3nks:feat/symlink-share-option

Conversation

@got3nks

@got3nks got3nks commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a Follow symbolic links in shared folders checkbox to the Directories preferences page. Default ON to preserve historical behaviour. When off, wxDIR_NO_FOLLOW is OR'd into the iterator flags at the three share-walk sites:

  • SharedFileList::AddFilesFromDirectory (per-share file walk)
  • SharedDirsApplyTask (recursive subdir expansion)
  • SharedDirWatcher::WalkForUnknownSubdirs (cold-discover walk)

The extra flag is plumbed through a new optional extraFlags parameter on CDirIterator::GetFirstFile, keeping libs/common unaware of application-level preferences.

Toggling the preference triggers a Reload() so the shareset reflects the new policy without an amuled restart.

Headless / amuled users

The preference is stored as FollowSymlinksInShares under the [eMule] section of amule.conf. Headless setups can flip it without the GUI:

[eMule]
FollowSymlinksInShares=0

Restart amuled (or save + reload) for the change to take effect.

Refs

Refs #808 (Stoatwblr's third point)

CDirIterator used wxDIR_FILES/DIRS without wxDIR_NO_FOLLOW, so symbolic
links (file and directory) were always traversed during shared-folder
walks. That's the right default for most users but a privacy concern
for setups where a symlink can point outside the intended share root.

Adds a "Follow symbolic links in shared folders" checkbox to the
Directories preferences page. Default ON to preserve existing
behaviour. When off, wxDIR_NO_FOLLOW is OR'd into the iterator flags
at the three share-walk sites (SharedFileList::AddFilesFromDirectory,
SharedDirsApplyTask, SharedDirWatcher::WalkForUnknownSubdirs).

The extra flag is plumbed through a new optional extraFlags parameter
on CDirIterator::GetFirstFile, keeping libs/common unaware of
application-level preferences.

Toggling the preference triggers a Reload so the shareset reflects
the new policy without an amuled restart.

Refs amule-project#808
@got3nks

got3nks commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

@ngosang may need to update the amule.conf and GUI settings in the docs later on.

Not sure if the watcher is already documented in the amule.conf docs too, the flag is AutoRescanSharedDirs=1

…LOGIN collision

Master uses 10334 for IDC_AUTOSTART_LOGIN (in PreferencesGeneralTab),
and PrefsUnifiedDlg looks it up via FindWindow. Two checkboxes under
the same PrefsUnifiedDlg parent sharing an ID would make FindWindow
return the wrong control. 10343 is the next free slot above the
current highest ID (10342, ID_ABOUT).
@mrjimenez
mrjimenez merged commit 98a3281 into amule-project:master Jun 1, 2026
7 checks passed
@ngosang

ngosang commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Documented here => amule-org/amule-org.github.io#81
Could you provide a windows package for the screenshot?

@got3nks

got3nks commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

Documented here => amule-org/amule-org.github.io#81 Could you provide a windows package for the screenshot?

Whenever there’s a commit the packaging runs automatically: https://github.com/amule-project/amule/actions/runs/26787585435

@ngosang

ngosang commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

@got3nks
got3nks deleted the feat/symlink-share-option branch June 3, 2026 14:16
got3nks added a commit to got3nks/amule that referenced this pull request Jun 4, 2026
Captures translatable strings introduced after the previous po
refresh (post-amule-project#747 wave). Notable new entries:

  - "Connection failed. Please check the host, port, and password."
    (amule-project#841 — amulegui retry-on-connect-failure)
  - "Force ZLIB compression" (amule-project#840 — EC client-tag locality override)
  - "Follow symbolic links in shared folders" (amule-project#809)
  - "Connection Type:" (amule-project#824 — ED2K Info readability)
  - "Documentation: https://amule-org.github.io/docs " (amule-project#801 — wiki
    URL migration)

Generated with `scripts/update-po.sh` from a working tree that has
PR amule-project#841 applied locally, so the new amulegui retry-loop strings
are included even though amule-project#841 itself is not in this branch — when
amule-project#841 lands on master, the .po files will already reflect its
strings without needing a second regeneration pass.

The remaining churn is line-number realignment across the ~38
language files from a month of source-code drift.
got3nks added a commit to got3nks/amule that referenced this pull request Jun 4, 2026
Captures translatable strings introduced after the previous po
refresh (post-amule-project#747 wave). Notable new entries:

  - "Connection failed. Please check the host, port, and password."
    (amule-project#841 — amulegui retry-on-connect-failure)
  - "Force ZLIB compression" (amule-project#840 — EC client-tag locality override)
  - "Follow symbolic links in shared folders" (amule-project#809)
  - "Connection Type:" (amule-project#824 — ED2K Info readability)
  - "Documentation: https://amule-org.github.io/docs " (amule-project#801 — wiki
    URL migration)

Generated with `scripts/update-po.sh` from a working tree that has
PR amule-project#841 applied locally, so the new amulegui retry-loop strings
are included even though amule-project#841 itself is not in this branch — when
amule-project#841 lands on master, the .po files will already reflect its
strings without needing a second regeneration pass.

The remaining churn is line-number realignment across the ~38
language files from a month of source-code drift.
mrjimenez pushed a commit that referenced this pull request Jun 4, 2026
Captures translatable strings introduced after the previous po
refresh (post-#747 wave). Notable new entries:

  - "Connection failed. Please check the host, port, and password."
    (#841 — amulegui retry-on-connect-failure)
  - "Force ZLIB compression" (#840 — EC client-tag locality override)
  - "Follow symbolic links in shared folders" (#809)
  - "Connection Type:" (#824 — ED2K Info readability)
  - "Documentation: https://amule-org.github.io/docs " (#801 — wiki
    URL migration)

Generated with `scripts/update-po.sh` from a working tree that has
PR #841 applied locally, so the new amulegui retry-loop strings
are included even though #841 itself is not in this branch — when
#841 lands on master, the .po files will already reflect its
strings without needing a second regeneration pass.

The remaining churn is line-number realignment across the ~38
language files from a month of source-code drift.
got3nks added a commit to got3nks/amule that referenced this pull request Aug 6, 2026
Reported in amule-project#809: the entry sat second from last, between Connect and Exit,
so restoring the window from the tray meant reading past the client
information submenu and both speed submenus. It is the entry people reach
for most, and tray menus conventionally lead with it.

It now sits directly under the version banner, which stays first as the
menu's header, and above everything else. Changed in both backends -- the
SNI/appindicator menu used on Linux and the wxTaskBarIcon menu used
everywhere else -- so the two do not drift.

The Wayland pair of deterministic Show and Hide entries moves as a unit.
Separators are rebalanced so the entry has one above and one below, leaving
Connect and Exit adjacent under a single separator as before.
got3nks added a commit to got3nks/amule that referenced this pull request Aug 6, 2026
Reported in amule-project#809: the entry sat second from last, between Connect and Exit,
so restoring the window from the tray meant reading past the client
information submenu and both speed submenus. It is the entry people reach
for most, and tray menus conventionally lead with it.

It now sits directly under the version banner, which stays first as the
menu's header, and above everything else. Changed in both backends -- the
SNI/appindicator menu used on Linux and the wxTaskBarIcon menu used
everywhere else -- so the two do not drift.

The Wayland pair of deterministic Show and Hide entries moves as a unit.
Separators are rebalanced so the entry has one above and one below, leaving
Connect and Exit adjacent under a single separator as before.
mrjimenez pushed a commit to mrjimenez/amule that referenced this pull request Aug 8, 2026
…ject#816)

Reported in amule-project#809: the entry sat second from last, between Connect and Exit,
so restoring the window from the tray meant reading past the client
information submenu and both speed submenus. It is the entry people reach
for most, and tray menus conventionally lead with it.

It now sits directly under the version banner, which stays first as the
menu's header, and above everything else. Changed in both backends -- the
SNI/appindicator menu used on Linux and the wxTaskBarIcon menu used
everywhere else -- so the two do not drift.

The Wayland pair of deterministic Show and Hide entries moves as a unit.
Separators are rebalanced so the entry has one above and one below, leaving
Connect and Exit adjacent under a single separator as before.

Catalogs are regenerated: they record each msgid's source position, so
moving the two call sites reorders their entries even though no string
changed. Pure reorder -- identical msgid sets, every catalog still compiles,
translated/fuzzy/untranslated counts unchanged.

The appindicator half is not built by CI (cmake_ubuntu_deps has no
libayatana-appindicator3-dev), so it was compiled separately on Ubuntu
26.04 arm64 with the SNI backend active, and the menu order confirmed
visually.

Closes amule-project#809.
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.

3 participants