Skip to content

Commit

Permalink
Fix macos build
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulh committed Sep 9, 2024
1 parent 1902afb commit ebf7d90
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions machine_creator/DiskWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -641,9 +641,14 @@ void DiskWriter::writeToRemovableDevice(const QString &filename, UsbDisk *d)
// qDebug() << n << " bytes written out of " << r << " bytes";
if (n != alignedSize)
{
qDebug() << "Failed to write " << alignedSize << "bytes, got " << n << ": " << phyDev.errorString() << ": " << Utils::errorMessageFromCode(GetLastError());
#ifdef Q_OS_WIN
QString err = phyDev.errorString() + ": " + Utils::errorMessageFromCode(GetLastError());
#else
QString err = phyDev.errorString();
#endif
qDebug() << "Failed to write " << alignedSize << "bytes, got " << n << ": " << err;
qDebug() << "writtenBytes = " << writtenBytes << ", totalBytes = " << totalBytes << ", timer = " << timer.elapsed();
emit error("Failed to write to " + disk->get_physicalDevice() + ": " + phyDev.errorString() + ": " + Utils::errorMessageFromCode(GetLastError()));
emit error("Failed to write to " + disk->get_physicalDevice() + ": " + err);
return;
}

Expand Down

0 comments on commit ebf7d90

Please sign in to comment.