It suffices to open a node read-only to write its attributes. In fact

open() is supposed to fail for directories when write access is
requested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22168 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2007-09-04 18:57:13 +00:00
parent 011e7a3d71
commit 6aae5da480

View File

@ -1107,7 +1107,7 @@ static int set_file_attrs( const char *name,
ptr = (unsigned char *)attr_buff;
guard = ptr + attr_size;
fd = open( name, O_RDWR | O_NOTRAVERSE );
fd = open( name, O_RDONLY | O_NOTRAVERSE );
if( fd < 0 ) {
return errno; /* should it be -fd ? */
}