* just in case fixy
This commit is contained in:
parent
0287eac77d
commit
9ed32437cd
|
@ -19,7 +19,7 @@ public class MetaAttributeView extends AbstractMap<String, String> {
|
|||
private final Charset encoding;
|
||||
|
||||
public MetaAttributeView(File file) throws IOException {
|
||||
Path path = file.toPath();
|
||||
Path path = file.getCanonicalFile().toPath();
|
||||
while (isSymbolicLink(path)) {
|
||||
Path link = readSymbolicLink(path);
|
||||
if (!link.isAbsolute()) {
|
||||
|
|
|
@ -100,6 +100,10 @@ public final class FileUtilities {
|
|||
|
||||
public static File createRelativeSymlink(File link, File target, boolean relativize) throws IOException {
|
||||
if (relativize) {
|
||||
// make sure we're working with the full path
|
||||
link = link.getCanonicalFile();
|
||||
target = target.getCanonicalFile();
|
||||
|
||||
try {
|
||||
target = link.getParentFile().toPath().relativize(target.toPath()).toFile();
|
||||
} catch (Throwable e) {
|
||||
|
|
Loading…
Reference in New Issue