[Goodies-commits] r7583 - xfburn/trunk/xfburn
David Mohr
squisher at xfce.org
Tue Jun 16 07:44:16 CEST 2009
Author: squisher
Date: 2009-06-16 05:44:16 +0000 (Tue, 16 Jun 2009)
New Revision: 7583
Modified:
xfburn/trunk/xfburn/xfburn-perform-burn.c
Log:
Correctly calculate audio cd available size using a little hack
Modified: xfburn/trunk/xfburn/xfburn-perform-burn.c
===================================================================
--- xfburn/trunk/xfburn/xfburn-perform-burn.c 2009-06-15 19:55:24 UTC (rev 7582)
+++ xfburn/trunk/xfburn/xfburn-perform-burn.c 2009-06-16 05:44:16 UTC (rev 7583)
@@ -69,6 +69,7 @@
int dbg_no;
int total_sectors, burned_sectors;
off_t disc_size;
+ int disc_sectors;
gboolean stopping = FALSE;
while (burn_drive_get_status (drive, NULL) != BURN_DRIVE_IDLE)
@@ -108,7 +109,14 @@
total_sectors = burn_disc_get_sectors (disc);
disc_size = burn_disc_available_space (drive, burn_options);
- if (disc_size < ((off_t)total_sectors * sector_size)) {
+
+ /* available_space assumes data tracks. If we're not doing data, we need to convert */
+ if (sector_size != DATA_BYTES_PER_SECTOR)
+ disc_sectors = disc_size / DATA_BYTES_PER_SECTOR * sector_size;
+ else
+ disc_sectors = disc_size / DATA_BYTES_PER_SECTOR;
+
+ if (disc_sectors < total_sectors) {
xfburn_progress_dialog_burning_failed (XFBURN_PROGRESS_DIALOG (dialog_progress), _("There is not enough space available on the inserted disc."));
return;
}
More information about the Goodies-commits
mailing list