Removed DataEditor::SetToAttribute() method.
DataEditor::InitCheck() is now properly working for all types. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6747 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
9993df0f2a
commit
707aa753f3
@ -224,8 +224,10 @@ DataEditor::SetTo(BEntry &entry, const char *attribute)
|
||||
if (IsAttribute()) {
|
||||
attr_info info;
|
||||
status = fFile.GetAttrInfo(fAttribute, &info);
|
||||
if (status != B_OK)
|
||||
if (status != B_OK) {
|
||||
fFile.Unset();
|
||||
return status;
|
||||
}
|
||||
|
||||
fSize = info.size;
|
||||
fType = info.type;
|
||||
@ -263,27 +265,9 @@ DataEditor::SetTo(BEntry &entry, const char *attribute)
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
DataEditor::SetToAttribute(const char *attribute)
|
||||
{
|
||||
status_t status = InitCheck();
|
||||
if (status < B_OK)
|
||||
return status;
|
||||
|
||||
fAttribute = attribute;
|
||||
|
||||
// ToDo: attributes are not yet supported
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
DataEditor::InitCheck()
|
||||
{
|
||||
if (fAttribute != NULL)
|
||||
// ToDo: for now!
|
||||
return B_ERROR;
|
||||
|
||||
return fFile.InitCheck();
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,6 @@ class DataEditor : public BLocker {
|
||||
status_t SetTo(const char *path, const char *attribute = NULL);
|
||||
status_t SetTo(entry_ref &ref, const char *attribute = NULL);
|
||||
status_t SetTo(BEntry &entry, const char *attribute = NULL);
|
||||
status_t SetToAttribute(const char *attribute);
|
||||
|
||||
bool IsReadOnly() const { return fIsReadOnly; }
|
||||
bool IsDevice() const { return fIsDevice; }
|
||||
|
Loading…
Reference in New Issue
Block a user