From 0287eac77d21709f59af90a4f6f9ca2c724be980 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 8 Jan 2014 19:29:20 +0000 Subject: [PATCH] * fix for relative symlinks --- source/net/sourceforge/filebot/MetaAttributeView.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/net/sourceforge/filebot/MetaAttributeView.java b/source/net/sourceforge/filebot/MetaAttributeView.java index 8a4d384e..a97f7666 100644 --- a/source/net/sourceforge/filebot/MetaAttributeView.java +++ b/source/net/sourceforge/filebot/MetaAttributeView.java @@ -21,7 +21,11 @@ public class MetaAttributeView extends AbstractMap { 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);