summaryrefslogtreecommitdiff
path: root/modules/remote-filesystem
diff options
context:
space:
mode:
authorClaudius 'keldu' Holeksa <mail@keldu.de>2024-08-14 21:20:28 +0200
committerClaudius 'keldu' Holeksa <mail@keldu.de>2024-08-14 21:20:28 +0200
commit903dc78b7b3542e7fc7e865a4acc60df68688d53 (patch)
treea363129254f443aac2904346cc8ec3eadfc06eba /modules/remote-filesystem
parentb101481315dec728b7c4fb466322ac861cd6dcf2 (diff)
wip
Diffstat (limited to 'modules/remote-filesystem')
-rw-r--r--modules/remote-filesystem/c++/transfer.hpp8
-rw-r--r--modules/remote-filesystem/tests/transport.cpp1
2 files changed, 4 insertions, 5 deletions
diff --git a/modules/remote-filesystem/c++/transfer.hpp b/modules/remote-filesystem/c++/transfer.hpp
index 22a35a8..26a2b7b 100644
--- a/modules/remote-filesystem/c++/transfer.hpp
+++ b/modules/remote-filesystem/c++/transfer.hpp
@@ -43,7 +43,7 @@ public:
return generate_invalid_id_error();
}
- std::basic_ofstream<uint8_t> s{addr_.get_path(), s.binary | s.out | s.trunc};
+ std::fstream s{addr_.get_path(), s.binary | s.out | s.trunc};
if(!s.is_open()){
return make_error<err::not_found>("Couldn't open file");
}
@@ -51,7 +51,7 @@ public:
auto& buff = dat.get_buffer();
buffer_view buff_v{buff};
while(buff_v.read_segment_length() > 0u){
- s.write(&buff_v.read(), buff_v.read_segment_length());
+ s.write(reinterpret_cast<char*>(&buff_v.read()), buff_v.read_segment_length());
buff_v.read_advance(buff_v.read_segment_length());
}
s.flush();
@@ -86,12 +86,12 @@ public:
data<Schema, Encoding> dat{heap<array_buffer>(1u)};
- std::basic_fstream<uint8_t> s{addr_.get_path(), s.binary | s.in};
+ std::fstream s{addr_.get_path(), s.binary | s.in};
if(!s.is_open()){
return make_error<err::not_found>("Couldn't open file");
}
uint8_t ele{};
- while(s.readsome(&ele, 1u) > 0u){
+ while(s.readsome(reinterpret_cast<char*>(&ele), 1u) > 0u){
auto err = dat.get_buffer().push(ele,1u);
if(err.failed()){
diff --git a/modules/remote-filesystem/tests/transport.cpp b/modules/remote-filesystem/tests/transport.cpp
index d12a971..e7079ec 100644
--- a/modules/remote-filesystem/tests/transport.cpp
+++ b/modules/remote-filesystem/tests/transport.cpp
@@ -15,7 +15,6 @@ using Foo = Struct<
SAW_TEST("File Remote"){
using namespace saw;
- return;
remote<rmt::File> file_remote;