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.
This commit is contained in:
Josef Söntgen 2012-06-15 09:41:48 +02:00 committed by Norman Feske
parent 976e7b4288
commit d28465cb3a
1 changed files with 2 additions and 1 deletions

View File

@ -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; }