* ISO-9660 did not like files with only a single character length.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27573 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2008-09-15 15:03:05 +00:00
parent 127f6d39ef
commit 1dd3b2c724
@@ -826,18 +826,15 @@ InitNode(iso9660_inode* node, char* buffer, size_t* _bytesRead,
// on joliet discs, buffer[0] can be 0 for Unicoded filenames, // on joliet discs, buffer[0] can be 0 for Unicoded filenames,
// so I've added a check here to test explicitely for // so I've added a check here to test explicitely for
// directories (which have length 1) // directories (which have length 1)
if (node->name_length == 1) {
// Take care of "." and "..", the first two dirents are // Take care of "." and "..", the first two dirents are
// these in iso. // these in iso.
if (buffer[0] == 0) { if (node->name_length == 1 && buffer[0] == 0) {
node->name = strdup("."); node->name = strdup(".");
node->name_length = 1; node->name_length = 1;
} else if (buffer[0] == 1) { } else if (node->name_length == 1 && buffer[0] == 1) {
node->name = strdup(".."); node->name = strdup("..");
node->name_length = 2; node->name_length = 2;
} } else if (jolietLevel > 0) {
} else {
if (jolietLevel > 0) {
// JOLIET extension: convert Unicode16 string to UTF8 // JOLIET extension: convert Unicode16 string to UTF8
// Assume that the unicode->utf8 conversion produces 4 byte // Assume that the unicode->utf8 conversion produces 4 byte
// utf8 characters, and allocate that much space // utf8 characters, and allocate that much space
@@ -872,7 +869,6 @@ InitNode(iso9660_inode* node, char* buffer, size_t* _bytesRead,
sanitize_iso_name(node, true); sanitize_iso_name(node, true);
} }
}
if (node->name == NULL) { if (node->name == NULL) {
TRACE(("InitNode - unable to allocate memory!\n")); TRACE(("InitNode - unable to allocate memory!\n"));