Fixed include paths handling

master
Marco Maccaferri 2019-09-13 09:21:47 +02:00
rodzic 4762bcc745
commit 99e05c313b
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -18,7 +18,7 @@ public class Incbin extends Directive {
@Override
public void register(Scope scope, Line line) {
line.setInstruction(new nl.grauw.glass.instructions.Incbin(sourceFile, includePaths));
line.setInstruction(new nl.grauw.glass.instructions.Incbin(sourceFile.getParentFile(), includePaths));
super.register(scope, line);
}

Wyświetl plik

@ -85,7 +85,7 @@ public class Incbin extends InstructionFactory {
private byte[] loadFile() {
for (File basePath : basePaths) {
File fullPath = new File(basePath.getParent(), path.getString());
File fullPath = new File(basePath, path.getString());
if (fullPath.exists()) {
try {
return Files.readAllBytes(fullPath.toPath());