From d28465cb3abe148b48dd4c4d72868aebaee0d06a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Fri, 15 Jun 2012 09:41:48 +0200 Subject: [PATCH] Noux: fix missing mode propagation When opening a new file, a new Fs_vfs_handle is created but with the initial mode set to 0 which is not expected by functions like fdopen() that check if the original flags given to the open() call match the returned ones on the used fd. Fixes #289. --- ports/src/noux/fs_file_system.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/src/noux/fs_file_system.h b/ports/src/noux/fs_file_system.h index fa84dc0d8..c6d6b4f97 100644 --- a/ports/src/noux/fs_file_system.h +++ b/ports/src/noux/fs_file_system.h @@ -343,7 +343,8 @@ namespace Noux { ::File_system::File_handle file = _fs.file(dir, file_name.base() + 1, mode, create); - return new (env()->heap()) Fs_vfs_handle(this, 0, file); + + return new (env()->heap()) Fs_vfs_handle(this, mode, file); } catch (::File_system::Permission_denied) { error = Sysio::OPEN_ERR_NO_PERM; }