From 6aae5da480fc1ec26c97ffd8245247433a08d7c7 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Tue, 4 Sep 2007 18:57:13 +0000 Subject: [PATCH] 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 --- src/bin/unzip/beos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/unzip/beos.c b/src/bin/unzip/beos.c index b60306b5e2..28c66eb7a9 100644 --- a/src/bin/unzip/beos.c +++ b/src/bin/unzip/beos.c @@ -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 ? */ }