tagatac / bagoup

Mac OS Messages export
GNU Affero General Public License v3.0
72 stars 4 forks source link

Truncate chat filename if it will exceed 255 characters #34

Closed tagatac closed 2 years ago

tagatac commented 2 years ago

What is changing: Chat files names are created by joining all of the email addresses and/or phone numbers used to message the given contact. These file names are now limited to 255 characters, including the file type suffixes.

Why this change is being made: Most filesystems do not support filenames longer than 255 characters: https://en.wikipedia.org/wiki/Comparison_of_file_systems#Limits

Related issue(s): Fixes #32

Follow-up changes needed: Possibly address file path length limits.

Is the change completely covered by unit tests? If not, why not?: Yes.

codecov[bot] commented 2 years ago

Codecov Report

Base: 99.20% // Head: 99.20% // Increases project coverage by +0.00% :tada:

Coverage data is based on head (ec19758) compared to base (f312bd2). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #34 +/- ## ======================================= Coverage 99.20% 99.20% ======================================= Files 7 7 Lines 755 758 +3 ======================================= + Hits 749 752 +3 Misses 4 4 Partials 2 2 ``` | [Impacted Files](https://codecov.io/gh/tagatac/bagoup/pull/34?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Tagatac) | Coverage Δ | | |---|---|---| | [internal/bagoup/write.go](https://codecov.io/gh/tagatac/bagoup/pull/34/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Tagatac#diff-aW50ZXJuYWwvYmFnb3VwL3dyaXRlLmdv) | `97.81% <100.00%> (+0.04%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Tagatac). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Tagatac)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.