Skip to content

Commit

Permalink
Ensure buffering is used when writing uncompressed images
Browse files Browse the repository at this point in the history
Just feed them through the libarchive workflow as well.
Prevents issues on Windows/osx when writing uncompressed images
that come from the Internet.

Ref #473
  • Loading branch information
maxnet committed Aug 18, 2022
1 parent 2c00c64 commit 9c95398
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/imagewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ void ImageWriter::startWrite()
{
_thread = new LocalFileExtractThread(urlstr, _dst.toLatin1(), _expectedHash, this);
}
else if (compressed)
else
{
_thread = new DownloadExtractThread(urlstr, _dst.toLatin1(), _expectedHash, this);
if (_repo.toString() == OSLIST_URL)
Expand All @@ -287,11 +287,6 @@ void ImageWriter::startWrite()
tele->start();
}
}
else
{
_thread = new DownloadThread(urlstr, _dst.toLatin1(), _expectedHash, this);
_thread->setInputBufferSize(IMAGEWRITER_UNCOMPRESSED_BLOCKSIZE);
}

connect(_thread, SIGNAL(success()), SLOT(onSuccess()));
connect(_thread, SIGNAL(error(QString)), SLOT(onError(QString)));
Expand Down

0 comments on commit 9c95398

Please sign in to comment.