Browse Source

Recognize symlinks in the FileTreeIterator

We did this for the Eclipse Platform in the ContainerTreeIterator.

Change-Id: I80d8157cc0dd99d57e2ed5d7cd8b13525a0c62b1
stable-3.3
Robin Rosenberg 12 years ago committed by Matthias Sohn
parent
commit
b434241e73
  1. 4
      org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java

4
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

Loading…
Cancel
Save