handle directories correctly
This commit is contained in:
parent
1f60e35331
commit
9b4cb862f8
1 changed files with 3 additions and 1 deletions
|
@ -726,9 +726,11 @@ find_path (struct grub_btrfs_data *data,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GRUB_BTRFS_ITEM_TYPE_INODE_ITEM:
|
case GRUB_BTRFS_ITEM_TYPE_INODE_ITEM:
|
||||||
if (*slash)
|
if (*slash && *type == GRUB_BTRFS_DIR_ITEM_TYPE_REGULAR)
|
||||||
return grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
|
return grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
|
||||||
*key = cdirel->key;
|
*key = cdirel->key;
|
||||||
|
if (*type == GRUB_BTRFS_DIR_ITEM_TYPE_DIRECTORY)
|
||||||
|
key->type = GRUB_BTRFS_ITEM_TYPE_DIR_ITEM;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return grub_error (GRUB_ERR_BAD_FS, "unrecognised object type 0x%x",
|
return grub_error (GRUB_ERR_BAD_FS, "unrecognised object type 0x%x",
|
||||||
|
|
Loading…
Reference in a new issue