Fixed mis-automerge

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-03-16 18:05:47 +00:00
parent 9db8bd782d
commit 0f95802699

View file

@ -246,18 +246,21 @@ class RestoreFromBackup extends Command
return false;
}
$bytes_read = 0;
while (($buffer = fgets($sql_contents, self::$buffer_size)) !== false) {
$bytes_read += strlen($buffer);
// \Log::debug("Buffer is: '$buffer'");
$bytes_written = fwrite($pipes[0], $buffer);
if ($bytes_written === false) {
$stdout = fgets($pipes[1]);
$this->info($stdout);
$stderr = fgets($pipes[2]);
$this->info($stderr);
return false;
}
}
if (!feof($sql_contents) || $bytes_read == 0) {
return $this->error("Not at end of file for sql file, or zero bytes read. aborting!");
}