* fix for relative symlinks
This commit is contained in:
parent
d63fca6787
commit
0287eac77d
|
@ -21,7 +21,11 @@ public class MetaAttributeView extends AbstractMap<String, String> {
|
|||
public MetaAttributeView(File file) throws IOException {
|
||||
Path path = file.toPath();
|
||||
while (isSymbolicLink(path)) {
|
||||
path = readSymbolicLink(path);
|
||||
Path link = readSymbolicLink(path);
|
||||
if (!link.isAbsolute()) {
|
||||
link = path.getParent().resolve(link);
|
||||
}
|
||||
path = link;
|
||||
}
|
||||
|
||||
attributeView = Files.getFileAttributeView(path, UserDefinedFileAttributeView.class);
|
||||
|
|
Loading…
Reference in New Issue