- 'get to file end' condition added when reading file
authorJiří Škrábal <nykolas@ics.muni.cz>
Wed, 20 Jul 2005 09:59:08 +0000 (09:59 +0000)
committerJiří Škrábal <nykolas@ics.muni.cz>
Wed, 20 Jul 2005 09:59:08 +0000 (09:59 +0000)
org.glite.lb.common/src/lb_maildir.c

index be4e180..6711663 100644 (file)
@@ -241,6 +241,7 @@ int edg_wll_MaildirTransStart(
                        snprintf(lbm_errdesc, MAX_ERR_LEN, "Can't read file '%s'", newfname);
                        goto err;
                }
+               if ( ct == 0 ) break;
                bufuse += ct;
        } while ( ct == toread );
        close(fhnd);