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:
@@ -224,8 +224,10 @@ DataEditor::SetTo(BEntry &entry, const char *attribute)
|
|||||||
if (IsAttribute()) {
|
if (IsAttribute()) {
|
||||||
attr_info info;
|
attr_info info;
|
||||||
status = fFile.GetAttrInfo(fAttribute, &info);
|
status = fFile.GetAttrInfo(fAttribute, &info);
|
||||||
if (status != B_OK)
|
if (status != B_OK) {
|
||||||
|
fFile.Unset();
|
||||||
return status;
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
fSize = info.size;
|
fSize = info.size;
|
||||||
fType = info.type;
|
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
|
status_t
|
||||||
DataEditor::InitCheck()
|
DataEditor::InitCheck()
|
||||||
{
|
{
|
||||||
if (fAttribute != NULL)
|
|
||||||
// ToDo: for now!
|
|
||||||
return B_ERROR;
|
|
||||||
|
|
||||||
return fFile.InitCheck();
|
return fFile.InitCheck();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ class DataEditor : public BLocker {
|
|||||||
status_t SetTo(const char *path, const char *attribute = NULL);
|
status_t SetTo(const char *path, const char *attribute = NULL);
|
||||||
status_t SetTo(entry_ref &ref, 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 SetTo(BEntry &entry, const char *attribute = NULL);
|
||||||
status_t SetToAttribute(const char *attribute);
|
|
||||||
|
|
||||||
bool IsReadOnly() const { return fIsReadOnly; }
|
bool IsReadOnly() const { return fIsReadOnly; }
|
||||||
bool IsDevice() const { return fIsDevice; }
|
bool IsDevice() const { return fIsDevice; }
|
||||||
|
|||||||
Reference in New Issue
Block a user