kopia lustrzana https://github.com/maccasoft/z80-tools
Fixed include paths handling
rodzic
4762bcc745
commit
99e05c313b
|
@ -18,7 +18,7 @@ public class Incbin extends Directive {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void register(Scope scope, Line line) {
|
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);
|
super.register(scope, line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ public class Incbin extends InstructionFactory {
|
||||||
|
|
||||||
private byte[] loadFile() {
|
private byte[] loadFile() {
|
||||||
for (File basePath : basePaths) {
|
for (File basePath : basePaths) {
|
||||||
File fullPath = new File(basePath.getParent(), path.getString());
|
File fullPath = new File(basePath, path.getString());
|
||||||
if (fullPath.exists()) {
|
if (fullPath.exists()) {
|
||||||
try {
|
try {
|
||||||
return Files.readAllBytes(fullPath.toPath());
|
return Files.readAllBytes(fullPath.toPath());
|
||||||
|
|
Ładowanie…
Reference in New Issue