diff options
author | Robin Rosenberg <robin.rosenberg@dewire.com> | 2013-07-11 00:18:33 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2014-02-12 11:09:24 +0100 |
commit | b434241e733443a414808b2d1b8397142749aa44 (patch) | |
tree | 14797424b72f03179372824b9338c2465915e1ea | |
parent | 0b3a5ab817a5d82f4a2f5866ae9de9f2d91e15fd (diff) | |
download | jgit-b434241e733443a414808b2d1b8397142749aa44.tar.gz jgit-b434241e733443a414808b2d1b8397142749aa44.zip |
Recognize symlinks in the FileTreeIterator
We did this for the Eclipse Platform in the ContainerTreeIterator.
Change-Id: I80d8157cc0dd99d57e2ed5d7cd8b13525a0c62b1
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java index 9e89791b84..8dc8276b3f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java @@ -166,7 +166,9 @@ public class FileTreeIterator extends WorkingTreeIterator { public FileEntry(final File f, FS fs) { this.fs = fs; attributes = fs.getAttributes(f); - if (attributes.isDirectory()) { + if (attributes.isSymbolicLink()) + mode = FileMode.SYMLINK; + else if (attributes.isDirectory()) { if (new File(f, Constants.DOT_GIT).exists()) mode = FileMode.GITLINK; else |