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> |
vor 8 Jahren | |
---|---|---|
.. | ||
diff | Allow setting FileMode to executable when applying patches in ApplyCommand | vor 8 Jahren |
indexdiff | Fix symlink content comparison on MacOS in tree walk | vor 7 Jahren |
nls | Fix TestTranslationBundle | vor 13 Jahren |
patch | Initial JGit contribution to eclipse.org | vor 14 Jahren |
test/resources | Fix ArrayIndexOutOfBoundsException in DirCacheIterator | vor 13 Jahren |