Fixed import - need to save the file before setting the address.

This is a specific requirement of how DOS stores addresses.
This commit is contained in:
Robert Greene 2004-06-22 03:08:14 +00:00
parent 8d45503f9a
commit 753a8ecbf6

View File

@ -1108,9 +1108,6 @@ public class DiskExplorerTab {
FileEntry fileEntry = directory.createFile(); FileEntry fileEntry = directory.createFile();
fileEntry.setFilename(spec.getTargetFilename()); fileEntry.setFilename(spec.getTargetFilename());
fileEntry.setFiletype(spec.getFiletype()); fileEntry.setFiletype(spec.getFiletype());
if (fileEntry.needsAddress()) {
fileEntry.setAddress(spec.getAddress());
}
try { try {
fileEntry.setFileData(buffer.toByteArray()); fileEntry.setFileData(buffer.toByteArray());
} catch (ProdosDiskSizeDoesNotMatchException ex) { } catch (ProdosDiskSizeDoesNotMatchException ex) {
@ -1130,6 +1127,9 @@ public class DiskExplorerTab {
fileEntry.setFileData(buffer.toByteArray()); fileEntry.setFileData(buffer.toByteArray());
} }
} }
if (fileEntry.needsAddress()) {
fileEntry.setAddress(spec.getAddress());
}
} }
} catch (Exception ex) { } catch (Exception ex) {
MessageBox box = new MessageBox(shell, MessageBox box = new MessageBox(shell,