- else
- // If we haven't got a result by now, try to just load plain file
- return createMediaObject(inPath);
+
+ // If we haven't got a result by now, try to load plain file
+ 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);