mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-12-31 22:30:16 +00:00
Updated to support raw file filter import and fixed a raw file export bug.
This commit is contained in:
parent
8519134bb1
commit
3f1fa1cfb2
@ -896,9 +896,12 @@ public class DiskExplorerTab {
|
||||
}
|
||||
filename = fileDialog.open();
|
||||
directory = fileDialog.getFilterPath();
|
||||
} else {
|
||||
} else if (fileFilter != null) {
|
||||
filename = directory + File.separator + AppleUtil.
|
||||
getNiceFilename(fileFilter.getSuggestedFileName(fileEntry));
|
||||
} else {
|
||||
filename = directory + File.separator + AppleUtil.
|
||||
getNiceFilename(fileEntry.getFilename());
|
||||
}
|
||||
if (filename != null) {
|
||||
userPreferences.setExportDirectory(directory);
|
||||
@ -1108,6 +1111,9 @@ public class DiskExplorerTab {
|
||||
FileEntry fileEntry = directory.createFile();
|
||||
fileEntry.setFilename(spec.getTargetFilename());
|
||||
fileEntry.setFiletype(spec.getFiletype());
|
||||
if (spec.isRawFileImport()) {
|
||||
disks[0].setFileData(fileEntry, buffer.toByteArray());
|
||||
} else {
|
||||
if (fileEntry.needsAddress()) {
|
||||
fileEntry.setAddress(spec.getAddress());
|
||||
}
|
||||
@ -1131,6 +1137,7 @@ public class DiskExplorerTab {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
MessageBox box = new MessageBox(shell,
|
||||
SWT.ICON_ERROR | SWT.OK);
|
||||
|
Loading…
Reference in New Issue
Block a user