Attribute directories must have the S_IFDIR flag set, attribute files
the S_IFREG flag. The missing flags caused the original BFS to crash on our files. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12796 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -990,7 +990,8 @@ Inode::CreateAttribute(Transaction &transaction, const char *name, uint32 type,
|
||||
{
|
||||
// do we need to create the attribute directory first?
|
||||
if (Attributes().IsZero()) {
|
||||
status_t status = Inode::Create(transaction, this, NULL, S_ATTR_DIR | 0666, 0, 0, NULL);
|
||||
status_t status = Inode::Create(transaction, this, NULL,
|
||||
S_ATTR_DIR | S_DIRECTORY | 0666, 0, 0, NULL);
|
||||
if (status < B_OK)
|
||||
RETURN_ERROR(status);
|
||||
}
|
||||
@@ -1000,7 +1001,8 @@ Inode::CreateAttribute(Transaction &transaction, const char *name, uint32 type,
|
||||
return B_ERROR;
|
||||
|
||||
// Inode::Create() locks the inode for us
|
||||
return Inode::Create(transaction, attributes, name, S_ATTR | 0666, 0, type, NULL, attribute);
|
||||
return Inode::Create(transaction, attributes, name,
|
||||
S_ATTR | S_REGULAR | 0666, 0, type, NULL, attribute);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -953,7 +953,8 @@ Inode::CreateAttribute(Transaction *transaction, const char *name, uint32 type,
|
||||
{
|
||||
// do we need to create the attribute directory first?
|
||||
if (Attributes().IsZero()) {
|
||||
status_t status = Inode::Create(transaction, this, NULL, S_ATTR_DIR | 0666, 0, 0, NULL);
|
||||
status_t status = Inode::Create(transaction, this, NULL,
|
||||
S_ATTR_DIR | S_DIRECTORY | 0666, 0, 0, NULL);
|
||||
if (status < B_OK)
|
||||
RETURN_ERROR(status);
|
||||
}
|
||||
@@ -963,7 +964,8 @@ Inode::CreateAttribute(Transaction *transaction, const char *name, uint32 type,
|
||||
return B_ERROR;
|
||||
|
||||
// Inode::Create() locks the inode for us
|
||||
return Inode::Create(transaction, attributes, name, S_ATTR | 0666, 0, type, NULL, attribute);
|
||||
return Inode::Create(transaction, attributes, name,
|
||||
S_ATTR | S_REGULAR | 0666, 0, type, NULL, attribute);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user