diff --git a/src/bakatools/file_system/file.cpp b/src/bakatools/file_system/file.cpp index 45c06b0..4389fda 100644 --- a/src/bakatools/file_system/file.cpp +++ b/src/bakatools/file_system/file.cpp @@ -16,7 +16,7 @@ namespace Bk::Tools { std::vector data; if(exists()) { - std::ifstream ifrm(ent.path(), std::ios::binary); + std::ifstream ifrm(path(), std::ios::binary); data.resize(size); ifrm.read(data.data(), data.size()); return DataStream(data); @@ -30,7 +30,6 @@ namespace Bk::Tools { std::ofstream ofrm(ent.path(), std::ios::binary); ofrm.write(stream.payload.data(), stream.payload.size()); return true; - } catch return false; - + } catch { return false; } } } \ No newline at end of file diff --git a/src/bakatools/file_system/file.h b/src/bakatools/file_system/file.h index aa50c08..be39ed0 100644 --- a/src/bakatools/file_system/file.h +++ b/src/bakatools/file_system/file.h @@ -20,7 +20,7 @@ namespace Bk::Tools { int remove() override; void copy(std::string path, CopyOption opt = CopyOption::overwrite_existing) override; - DataStream read(int size = size()); + DataStream read(int size); bool write(DataStream stream); BK_DIR_ENTRY_TYPE(regular)