Sitelet https://github.com/gpodder/gpodder/pull/1645
Skip to content

Limit the length of UTF-8 filenames. - #1645

Merged
auouymous merged 1 commit into
gpodder:masterfrom
auouymous:sanitize-utf8-filenames
Aug 5, 2024
Merged

auouymous merged 1 commit into
gpodder:masterfrom
auouymous:sanitize-utf8-filenames

Conversation

@auouymous

Copy link
Copy Markdown
Member

sanitize_filename() only counts the number of characters and not the multi-byte UTF-8 sequences. This patch converts the string to an array of UTF-8 bytes and then removes each multi-byte sequence until the length is below the limit.

sanitize_filename() only counts the number of characters and not the
multi-byte UTF-8 sequences. This patch converts the string to an array
of UTF-8 bytes and then removes each multi-byte sequence until the
length is below the limit.
@computerfreak105

computerfreak105 commented Jul 31, 2024 via email

Copy link
Copy Markdown

@auouymous

Copy link
Copy Markdown
Member Author

Will this fix be available in the next mac artifact?

It will be merged into gpodder in a few days assuming no one finds issues with it. I have been using it without problem, and if you want to test it, download http://borg.qzx.com/files/gpodder/util.py and overwrite the uitl.py file with it. I don't know where it is on Mac but it is at /home/appveyor/_gpodder_build_root/mingw32/lib/python3.11/site-packages/gpodder/util.py in the Windows build.

The Mac build, like the Windows build, is currently broken. The simplest option is to require macos-14, and everyone on 12 and 13 would be left out. The other option is to move from CircleCI to Github, but that eliminates public access to the artifacts. I should have some time in a couple days to work on it some more, and hopefully it just builds without needing either of those options.

@computerfreak105

computerfreak105 commented Aug 1, 2024 via email

Copy link
Copy Markdown

@computerfreak105

computerfreak105 commented Aug 1, 2024 via email

Copy link
Copy Markdown

@auouymous
auouymous merged commit 6d6bd7e into gpodder:master Aug 5, 2024
@auouymous
auouymous deleted the sanitize-utf8-filenames branch August 5, 2024 08:54
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.

2 participants