Skip to content

Commit

Permalink
fix: [burn] cannot blank DVD+RW
Browse files Browse the repository at this point in the history
use xorriso -dev /dev/sr0 -format full

Log: blank DVD+RW
  • Loading branch information
Johnson-zs authored and max-lvs committed Dec 1, 2023
1 parent ae0525e commit c92a6e3
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/dfm-burn/dfm-burn-lib/private/dxorrisoengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,18 @@ bool DXorrisoEngine::doErase()
XORRISO_OPT(xorriso, [this]() {
return Xorriso_option_abort_on(xorriso, PCHAR("ABORT"), 0);
});
int r = XORRISO_OPT(xorriso, [this]() {
return Xorriso_option_blank(xorriso, PCHAR("as_needed"), 0);
});

int r = 0;
if (mediaTypeProperty() == MediaType::kDVD_PLUS_RW) {
r = XORRISO_OPT(xorriso, [this]() {
return Xorriso_option_blank(xorriso, PCHAR("full"), 1);
});
} else {
r = XORRISO_OPT(xorriso, [this]() {
return Xorriso_option_blank(xorriso, PCHAR("as_needed"), 0);
});
}

if (JOBFAILED_IF(this, r, xorriso))
return false;

Expand Down

0 comments on commit c92a6e3

Please sign in to comment.