Skip to content

Conversation

@rdmark
Copy link
Member

@rdmark rdmark commented Nov 4, 2025

The convert_utf8_to_mac() function is based on utompath() which is implemented in etc/afpd/desktop.c but of a simpler, earlier form – we remove two duplicated implementations in nad and dbd respectively

In comparison, utompath() can handle other input charsets than UTF-8, while also doing Mac filename mangling after charset conversion

As a side note, utompath() in etc/afpd/desktop.c cannot easily be moved to libatalk since the mangling logic also sits in the afpd code, and has deep coupling with other afpd logic such as dirlookup(). A much larger refactoring would be needed here.

@rdmark rdmark linked an issue Nov 4, 2025 that may be closed by this pull request
@rdmark rdmark force-pushed the 2466-the-utompath-function-is-repeated-in-multiple-modules branch from 4f39db4 to 3e83784 Compare November 4, 2025 06:23
The convert_utf8_to_mac() function is based on utompath() which is implemented
in etc/afpd/desktop.c but of a simpler, earlier form

In comparison, utompath() can handle other input charsets than UTF-8,
while also doing Mac filename mangling after charset conversion

As a side note, utompath() in etc/afpd/desktop.c cannot easily be moved to libatalk
since the mangling logic also sits in the afpd code,
and has deep coupling with other afpd logic such as dirlookup().
A much larger refactoring would be needed here.
@rdmark rdmark force-pushed the 2466-the-utompath-function-is-repeated-in-multiple-modules branch from e141cd5 to ee9cbef Compare November 4, 2025 17:21
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 4, 2025

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.

The utompath() function is repeated in multiple modules

2 participants