Ignore:
Timestamp:
Jan 12, 2017, 11:48:04 AM (7 years ago)
Author:
Bruno Cornec
Message:

Do not exit too early when dealing with an empty file, as the verify step isn't working if we do. Just avoid to run what would create an issue instead (David C. Partridge david.partridge_at_perdrix.co.uk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3/mondo/src/common/libmondo-stream.c

    r3621 r3646  
    17611761    /*@ end vars *************************************************** */
    17621762
    1763     if (length_of_incoming_file <= 0) {
    1764         return(1);
    1765     }
    1766 
    17671763    olen = length_of_incoming_file;
    17681764    p = strrchr(filename, '/'); /* Make 'em go, "Unnnh!" Oh wait, that was _Master_ P... */
     
    17811777    sprintf(tempblock + 6000 + control_char, STR_HEADER);
    17821778    tempblock[7000] = control_char;
    1783     memcpy(tempblock + 7001, (char *) &olen, sizeof(off_t));
     1779    if (length_of_incoming_file > 0) {
     1780        memcpy(tempblock + 7001, (char *) &olen, sizeof(off_t));
     1781    }
    17841782    strcpy(tempblock + 1000, filename);
    17851783    g_tape_posK += fwrite(tempblock, 1, (size_t) TAPE_BLOCK_SIZE, g_tape_stream) / 1024;
Note: See TracChangeset for help on using the changeset viewer.