| author | Modestas Vainius <modax@debian.org> | |
| Sat, 14 May 2011 17:05:48 +0000 (20:05 +0300) | ||
| committer | Modestas Vainius <modax@debian.org> | |
| Sat, 14 May 2011 17:55:40 +0000 (20:55 +0300) | ||
| commit | 66efdda447a8cab41e953f46be2cce6149c7c5aa | |
| tree | ab9effeba43323e1a3c5c8ac0f1318eadf5cbb2a | tree | snapshot |
| parent | af9374ec888f9286002a24551f2512431fd1db72 | commit | diff |
Fix KTar longlink support when filenames are encoded in the UTF-8 locale.
tar archives have to use "longlink trick" to store names longer than 100 bytes.
KTar class has functions implementing longlink, but they check name length in
_characters_, not in bytes. For non-ASCII characters in UTF-8 length of string
in bytes and length in characters do not match. In my case file had
character-length less than 100 and byte-length greater than 100, so name simply
truncated. Such behavior can be observed on non-ASCII UTF-8 or any other
multibyte encoding. If file name is very long, resulting .tar may become
unreadable.
Implemented in ktar_longlink_length_in_bytes.diff patch (thanks to Ibragimov
Rinat). Closes: #612675
tar archives have to use "longlink trick" to store names longer than 100 bytes.
KTar class has functions implementing longlink, but they check name length in
_characters_, not in bytes. For non-ASCII characters in UTF-8 length of string
in bytes and length in characters do not match. In my case file had
character-length less than 100 and byte-length greater than 100, so name simply
truncated. Such behavior can be observed on non-ASCII UTF-8 or any other
multibyte encoding. If file name is very long, resulting .tar may become
unreadable.
Implemented in ktar_longlink_length_in_bytes.diff patch (thanks to Ibragimov
Rinat). Closes: #612675
| debian/changelog | diff | blob | history | |
| debian/patches/ktar_longlink_length_in_bytes.diff | [new file with mode: 0644] | blob |
| debian/patches/series | diff | blob | history |
