Comment 7 for bug 956729

Revision history for this message
bcbc (bcbc) wrote :

So not a bad burn... bug 207137 mentions a case where the optical drive can be a factor in the failure - the install was successful when the CD was in the DVDROM drive, but not the CD/RW drive on the same computer.

So it points more to something in the code src/wubi/backends/common/utils.py:
def copy_file(source, target, associated_task=None):
    '''
    Copy file with progress report
    '''
    if os.path.isfile(source):
        file_size = os.path.getsize(source)
    elif os.path.ismount(source):
        if sys.platform.startswith("win"):
            file_size = get_drive_space(source)
            source = "\\\\.\\%s" % source[:2]
    if associated_task:
        associated_task.size = file_size/1024**2
        associated_task.unit = "MB"
    source_file = open(source, "rb")
    target_file = open(target, "wb")
    data_read = 0
    while True:
        data = source_file.read(1024**2) <===== line 202
        data_read += 1
        if data == "":
            break
        if associated_task:
            if associated_task.set_progress(data_read):
                source_file.close()
                target_file.close()
                return
        target_file.write(data)
        if data_read >= file_size:
            break
    source_file.close()
    target_file.close()
    if associated_task:
        associated_task.finish()