diff options
Diffstat (limited to 'netfs/fuse/fuseFiles.cpp')
| -rw-r--r-- | netfs/fuse/fuseFiles.cpp | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/netfs/fuse/fuseFiles.cpp b/netfs/fuse/fuseFiles.cpp index 9f7bf5e..6b1ad1a 100644 --- a/netfs/fuse/fuseFiles.cpp +++ b/netfs/fuse/fuseFiles.cpp @@ -171,11 +171,12 @@ namespace NetFS {  		try {  			auto of = getProxy<OpenFilePtr>(fi->fh);  			auto remote = of->remote; +			auto bytes = reinterpret_cast<const ::Ice::Byte *>(buf);  			if (fcr->Async) { -				waitOnWriteRangeAndThen<void>(s, o, of, [o, s, buf, &of, remote](const auto & key) { +				waitOnWriteRangeAndThen<void>(s, o, of, [o, s, bytes, &of, remote](const auto & key) {  					auto p = std::make_shared<OpenFile::WriteState>();  					remote->writeAsync( -							o, safe {s}, Buffer(buf, buf + s), +							o, safe {s}, std::make_pair(bytes, bytes + s),  							[p, of, key]() {  								p->promise.set_value();  								ScopeLock(of->mutex) { @@ -192,7 +193,7 @@ namespace NetFS {  				});  			}  			else { -				remote->write(o, safe {s}, Buffer(buf, buf + s)); +				remote->write(o, safe {s}, std::make_pair(bytes, bytes + s));  			}  			return safe {s};  		} | 
