Fix KTar longlink support when filenames are encoded in the UTF-8 locale.
authorModestas Vainius <modax@debian.org>
Sat, 14 May 2011 17:05:48 +0000 (20:05 +0300)
committerModestas Vainius <modax@debian.org>
Sat, 14 May 2011 17:55:40 +0000 (20:55 +0300)
commit66efdda447a8cab41e953f46be2cce6149c7c5aa
treeab9effeba43323e1a3c5c8ac0f1318eadf5cbb2a
parentaf9374ec888f9286002a24551f2512431fd1db72
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
debian/changelog
debian/patches/ktar_longlink_length_in_bytes.diff [new file with mode: 0644]
debian/patches/series