mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
...
This commit is contained in:
parent
96c00508be
commit
724c3f491c
2
src/io.h
2
src/io.h
@ -15,7 +15,7 @@ inline Bytes _read_file_cwd(const Str& name){
|
||||
std::filesystem::path path(name.sv());
|
||||
bool exists = std::filesystem::exists(path);
|
||||
if(!exists) return Bytes();
|
||||
std::ifstream ifs(path);
|
||||
std::ifstream ifs(path, std::ios::binary);
|
||||
std::vector<char> buffer(std::istreambuf_iterator<char>(ifs), {});
|
||||
ifs.close();
|
||||
return Bytes(std::move(buffer));
|
||||
|
Loading…
x
Reference in New Issue
Block a user