jgit/org.eclipse.jgit.test/tst-rsrc
Thomas Wolf 26832a00e4 Fix symlink content comparison on MacOS in tree walk
Symlinks on MacOS are written as UTF-8 NFD, but
readSymbolicLink().toString() converts to NFC with potentially fewer
bytes. May occur in particular if the link target has non-ASCII
characters for which the NFC and NFD encodings differ. This may lead
to an EOFException: Short read of block.

This causes all kinds of weird effects in EGit, ranging from failing
rebases (which report the exception to the user) to EGit decorations in
the navigator silently disappearing (and never coming back).

* Rename readContentAsNormalizedString() to readSymlinkTarget() as it's
  called only for symlinks. Also make it protected.
* Fix by allowing the read to succeed even if less than the expected
  number of bytes are returned by the entry's input stream.
* Override in FileTreeIterator to use fs.readSymlink() directly.

Includes a new MacOS-only test.

Change-Id: I264c5972d67b1cbb1ed690580f5706e671b9affd
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-10-11 00:20:23 +02:00
..
META-INF/services Ignore trailing comments in transport SPI parsing 2012-03-21 14:07:55 -07:00
org/eclipse/jgit Fix symlink content comparison on MacOS in tree walk 2016-10-11 00:20:23 +02:00
jgit-s3-config.disabled.properties Adding AES Walk Encryption support in http://www.jets3t.org/ mode 2015-10-18 19:14:31 +00:00
jgit-s3-config.policy.bucket.json Adding AES Walk Encryption support in http://www.jets3t.org/ mode 2015-10-18 19:14:31 +00:00
jgit-s3-config.policy.user.json Adding AES Walk Encryption support in http://www.jets3t.org/ mode 2015-10-18 19:14:31 +00:00
jgit-s3-connection-v-0.properties Adding JGitV1 and JGitV2 Walk Encryption 2015-10-18 23:22:56 +02:00
jgit-s3-connection-v-1.properties Adding JGitV1 and JGitV2 Walk Encryption 2015-10-18 23:22:56 +02:00
jgit-s3-connection-v-2.properties Adding JGitV1 and JGitV2 Walk Encryption 2015-10-18 23:22:56 +02:00
log4j.properties Adding AES Walk Encryption support in http://www.jets3t.org/ mode 2015-10-18 19:14:31 +00:00