浏览代码

Ext2FS: Fix wrong file mode being passed from create_inode() to add_child().

Andreas Kling 6 年之前
父节点
当前提交
7562c0b7bf
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Kernel/FileSystem/Ext2FileSystem.cpp

+ 2 - 2
Kernel/FileSystem/Ext2FileSystem.cpp

@@ -761,7 +761,7 @@ KResult Ext2FSInode::add_child(InodeIdentifier child_id, const StringView& name,
     ASSERT(is_directory());
     ASSERT(is_directory());
 
 
     //#ifdef EXT2_DEBUG
     //#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
     //#endif
 
 
     Vector<FS::DirectoryEntry> entries;
     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.
     // 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()) {
     if (result.is_error()) {
         error = result;
         error = result;
         return {};
         return {};