This commit is contained in:
blueloveTH 2023-04-26 12:56:19 +08:00
parent 96c00508be
commit 724c3f491c

View File

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