From 7be2dafba9a6a2159768fc3c3dbdb6f2b15301a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 22 May 2007 09:24:19 +0000 Subject: [PATCH] fs_write_attr() is supposed to remove an existing attribute value. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21202 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/libroot/os/fs_attr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/system/libroot/os/fs_attr.c b/src/system/libroot/os/fs_attr.c index 3d97d3280a..2d84b244fb 100644 --- a/src/system/libroot/os/fs_attr.c +++ b/src/system/libroot/os/fs_attr.c @@ -1,5 +1,5 @@ /* - * Copyright 2002-2004, Axel Dörfler, axeld@pinc-software.de. + * Copyright 2002-2007, Axel Dörfler, axeld@pinc-software.de. * Distributed under the terms of the MIT License. */ @@ -54,7 +54,7 @@ fs_write_attr(int fd, const char *attribute, uint32 type, { ssize_t bytes; - int attr = _kern_create_attr(fd, attribute, type, O_WRONLY); + int attr = _kern_create_attr(fd, attribute, type, O_WRONLY | O_TRUNC); if (attr < 0) RETURN_AND_SET_ERRNO(attr);