noux: don't update mtimes for read-only files

The VFS server as reworked in issue #3547 responds to such an attempt
with a failure as acknowledgement, triggering the client-side error
"Error: packet operation=2 failed" at noux.
This commit is contained in:
Norman Feske 2019-11-07 22:16:03 +01:00 committed by Christian Helmuth
parent 65d72fb07a
commit 1485cd9d24

View File

@ -88,6 +88,7 @@ struct Noux::Vfs_io_channel : Io_channel
Registered_no_delete<Vfs_io_waiter>
vfs_io_waiter(_vfs_io_waiter_registry);
if (_fh.status_flags() != Sysio::OPEN_MODE_RDONLY) {
for (;;) {
if (_fh.fs().update_modification_timestamp(&_fh, ts)) {
break;
@ -96,6 +97,7 @@ struct Noux::Vfs_io_channel : Io_channel
vfs_io_waiter.wait_for_io();
}
}
}
while (!_fh.fs().queue_sync(&_fh))
vfs_io_waiter.wait_for_io();