From 0013964388c0e6724d4866978c5f4b3a726549f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 16 Jan 2007 14:40:15 +0000 Subject: [PATCH] Ported r19825 back to the R5 version of BFS. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19826 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../kernel/file_systems/bfs/r5/Inode.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/tests/add-ons/kernel/file_systems/bfs/r5/Inode.cpp b/src/tests/add-ons/kernel/file_systems/bfs/r5/Inode.cpp index 1c60d1714a..64f77e0a24 100644 --- a/src/tests/add-ons/kernel/file_systems/bfs/r5/Inode.cpp +++ b/src/tests/add-ons/kernel/file_systems/bfs/r5/Inode.cpp @@ -1,9 +1,10 @@ -/* Inode - inode access functions -** -** Copyright 2001-2005, Axel Dörfler, axeld@pinc-software.de -** This file may be used under the terms of the MIT License. -*/ +/* + * Copyright 2001-2007, Axel Dörfler, axeld@pinc-software.de + * This file may be used under the terms of the MIT License. + */ +//! inode access functions + #include "Debug.h" #include "Inode.h" @@ -813,6 +814,12 @@ Inode::WriteAttribute(Transaction *transaction, const char *name, int32 type, of } // ToDo: check if the data fits in the inode now and delete the attribute file if so status = attribute->WriteAt(transaction, pos, buffer, _length); + if (status == B_OK) { + // The attribute type might have been changed - we need to adopt + // the new one + attribute->Node()->type = HOST_ENDIAN_TO_BFS_INT32(type); + status = attribute->WriteBack(transaction); + } attribute->Lock().UnlockWrite(); } else