mirror of
https://github.com/badvision/jace.git
synced 2024-06-26 09:29:29 +00:00
Fixed extended filename parsing and broken sapling file issues
This commit is contained in:
parent
6c4136841e
commit
59ab31f433
|
@ -90,13 +90,13 @@ public class FileNode extends DiskNode {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
String[] parts = name.replaceAll("[^A-Za-z0-9]", ".").split("\\.");
|
String[] parts = name.replaceAll("[^A-Za-z0-9#]", ".").split("\\.");
|
||||||
FileType t = FileType.UNKNOWN;
|
FileType t = FileType.UNKNOWN;
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
String prodosName = name;
|
String prodosName = name;
|
||||||
if (parts.length > 1) {
|
if (parts.length > 1) {
|
||||||
String extension = parts[parts.length - 1].toUpperCase();
|
String extension = parts[parts.length - 1].toUpperCase();
|
||||||
String[] extParts = extension.split("#");
|
String[] extParts = extension.split("\\#");
|
||||||
if (extParts.length == 2) {
|
if (extParts.length == 2) {
|
||||||
offset = Integer.parseInt(extParts[1], 16);
|
offset = Integer.parseInt(extParts[1], 16);
|
||||||
extension = extParts[0];
|
extension = extParts[0];
|
||||||
|
@ -167,7 +167,7 @@ public class FileNode extends DiskNode {
|
||||||
readFile(buffer, (block - 1));
|
readFile(buffer, (block - 1));
|
||||||
} else {
|
} else {
|
||||||
// Generate seedling index block
|
// Generate seedling index block
|
||||||
generateIndex(buffer, 0, dataBlocks);
|
generateIndex(buffer, 1, treeBlocks + dataBlocks);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TREE:
|
case TREE:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user