mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Ext2FS: Fix wrong file mode being passed from create_inode() to add_child().
This commit is contained in:
parent
6873e7d016
commit
7562c0b7bf
Notes:
sideshowbarker
2024-07-19 13:40:00 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/7562c0b7bf0
1 changed files with 2 additions and 2 deletions
|
@ -761,7 +761,7 @@ KResult Ext2FSInode::add_child(InodeIdentifier child_id, const StringView& name,
|
|||
ASSERT(is_directory());
|
||||
|
||||
//#ifdef EXT2_DEBUG
|
||||
dbgprintf("Ext2FS: Adding inode %u with name '%s' to directory %u\n", child_id.index(), name.characters(), index());
|
||||
dbgprintf("Ext2FS: Adding inode %u with name '%s' and mode %o to directory %u\n", child_id.index(), name.characters(), mode, index());
|
||||
//#endif
|
||||
|
||||
Vector<FS::DirectoryEntry> entries;
|
||||
|
@ -1150,7 +1150,7 @@ RetainPtr<Inode> Ext2FS::create_inode(InodeIdentifier parent_id, const String& n
|
|||
}
|
||||
|
||||
// Try adding it to the directory first, in case the name is already in use.
|
||||
auto result = parent_inode->add_child({ fsid(), inode_id }, name, to_ext2_file_type(mode));
|
||||
auto result = parent_inode->add_child({ fsid(), inode_id }, name, mode);
|
||||
if (result.is_error()) {
|
||||
error = result;
|
||||
return {};
|
||||
|
|
Loading…
Reference in a new issue