X-Git-Url: https://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Fload%2FMediaHelper.java;h=ab4f366d820967c67674e916c15985cddc5debb2;hp=c55fc557ec6ee7bc5b58df0e19879b35935362ba;hb=4d5796d02a15808311c09448d79e6e7d1de9d636;hpb=f1b92378a792131ac8fb33a869405851d5b2d1f7 diff --git a/tim/prune/load/MediaHelper.java b/tim/prune/load/MediaHelper.java index c55fc55..ab4f366 100644 --- a/tim/prune/load/MediaHelper.java +++ b/tim/prune/load/MediaHelper.java @@ -88,7 +88,11 @@ public abstract class MediaHelper } // If we haven't got a result by now, try to load plain file - File file = (inSourceFile == null ? new File(inPath) : new File(inSourceFile.getParent(), inPath)); + File file = new File(inPath); + if (inSourceFile != null && !file.isAbsolute()) { + file = new File(inSourceFile.getParent(), inPath); + } + // awkward construction because new File(startPath, absolutePath) doesn't work return createMediaObject(file); }