mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-26 01:38:57 -05:00
* 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;
|
private final Charset encoding;
|
||||||
|
|
||||||
public MetaAttributeView(File file) throws IOException {
|
public MetaAttributeView(File file) throws IOException {
|
||||||
Path path = file.toPath();
|
Path path = file.getCanonicalFile().toPath();
|
||||||
while (isSymbolicLink(path)) {
|
while (isSymbolicLink(path)) {
|
||||||
Path link = readSymbolicLink(path);
|
Path link = readSymbolicLink(path);
|
||||||
if (!link.isAbsolute()) {
|
if (!link.isAbsolute()) {
|
||||||
|
@ -100,6 +100,10 @@ public final class FileUtilities {
|
|||||||
|
|
||||||
public static File createRelativeSymlink(File link, File target, boolean relativize) throws IOException {
|
public static File createRelativeSymlink(File link, File target, boolean relativize) throws IOException {
|
||||||
if (relativize) {
|
if (relativize) {
|
||||||
|
// make sure we're working with the full path
|
||||||
|
link = link.getCanonicalFile();
|
||||||
|
target = target.getCanonicalFile();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
target = link.getParentFile().toPath().relativize(target.toPath()).toFile();
|
target = link.getParentFile().toPath().relativize(target.toPath()).toFile();
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user