Skip to content

Commit

Permalink
fix: revert wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas authored Nov 14, 2024
1 parent f0fd179 commit 9a87f27
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/database/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ void Database::createDatabaseBackup(bool compress) const {
return;
}

char buffer[8192];
while (backupFile.read(buffer, sizeof(buffer)) || backupFile.gcount() > 0) {
gzwrite(gzFile, buffer, backupFile.gcount());
std::string buffer(8192, '\0');
while (backupFile.read(&buffer[0], buffer.size()) || backupFile.gcount() > 0) {
gzwrite(gzFile, buffer.data(), backupFile.gcount());
}

backupFile.close();
Expand Down

0 comments on commit 9a87f27

Please sign in to comment.