]> gitweb.hhaalo.de Git - discspan.git/commitdiff
remove: calc overhead
authorBastian Dehn <hhaalo@arcor.de>
Sun, 24 Dec 2017 13:50:01 +0000 (14:50 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sun, 24 Dec 2017 13:50:01 +0000 (14:50 +0100)
test with k3b 0 free bytes

discspan.c

index f7881fafe75394b1da6e041c69cee73f5323cf44..4bee7673b00fb2dff67caf2bd9eb82301258ff8c 100644 (file)
@@ -117,19 +117,13 @@ int splitter(struct file_size *input, const char *output,
                malloc(length * sizeof(struct file_size));
 
        unsigned long long filesize = 0;
-       char *filename;
        int restcount = 0;
        FILE *out;
 
-       // First 32768 bytes are unused by ISO9660
-       splitgroesse -= 32768;
-
        out = fopen(output, "w");
        for(int i = 0; i <= length; i++) {
                // ISO9660 filesystem overhead
-               filename = strrchr(input[i].name, '/') + 1;
-               filesize = 33 + strlen(filename) + input[i].fsize;
-               filesize = ceil(filesize / 2048.0) * 2048;
+               filesize = ceil(input[i].fsize / 2048.0) * 2048;
 
                if(splitgroesse >= filesize) {
                        splitgroesse -= filesize;