comparison src/org/tmatesoft/hg/util/RegularFileInfo.java @ 476:c02b5710d9ac

Defect: only first file in directory got flags initialized
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 12 Jul 2012 18:07:12 +0200
parents 909306e412e2
children 868b2ffdcd5c
comparison
equal deleted inserted replaced
475:0e34b8f3946a 476:c02b5710d9ac
99 99
100 public boolean isSymlink() { 100 public boolean isSymlink() {
101 return supportsLink && fileFlagsHelper.isSymlink(); 101 return supportsLink && fileFlagsHelper.isSymlink();
102 } 102 }
103 103
104 @Override
105 public String toString() {
106 char t = exists() ? (isExecutable() ? '*' : (isSymlink() ? '@' : '-')) : '!';
107 return String.format("RegularFileInfo[%s %c]", file.getPath(), t);
108 }
109
104 private byte[] getLinkTargetBytes() { 110 private byte[] getLinkTargetBytes() {
105 assert isSymlink(); 111 assert isSymlink();
106 // no idea what encoding Mercurial uses for link targets, assume platform native is ok 112 // no idea what encoding Mercurial uses for link targets, assume platform native is ok
107 return fileFlagsHelper.getSymlinkTarget().getBytes(); 113 return fileFlagsHelper.getSymlinkTarget().getBytes();
108 } 114 }