diff options
author | germeier <germeier> | 2002-09-14 16:14:46 +0000 |
---|---|---|
committer | germeier <germeier> | 2002-09-14 16:14:46 +0000 |
commit | cd1e9f58bdbbf0375de6fd75f5c245fcd857c0e1 (patch) | |
tree | 8c7393c2893780b5f38109b182c0d7b80accbfe3 | |
parent | baa05f4b072d1ddaa08d2ecf9d31158928df4439 (diff) | |
download | mpiosh-cd1e9f58bdbbf0375de6fd75f5c245fcd857c0e1.tar.gz mpiosh-cd1e9f58bdbbf0375de6fd75f5c245fcd857c0e1.tar.bz2 mpiosh-cd1e9f58bdbbf0375de6fd75f5c245fcd857c0e1.zip |
fixed display bug with mpio_file_put (100% is never reached)
-rw-r--r-- | libmpio/mpio.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/libmpio/mpio.c b/libmpio/mpio.c index b32dee6..8f3b87c 100644 --- a/libmpio/mpio.c +++ b/libmpio/mpio.c @@ -1,6 +1,6 @@ /* * - * $Id: mpio.c,v 1.14 2002/09/13 17:01:34 germeier Exp $ + * $Id: mpio.c,v 1.15 2002/09/14 16:14:46 germeier Exp $ * * Library for USB MPIO-* * @@ -461,6 +461,9 @@ mpio_file_put(mpio_t *m, mpio_mem_t mem, BYTE *filename, close(fd); + if (progress_callback) + (*progress_callback)((fsize-filesize), fsize); + if (abort) { /* delete the just written blocks, because the user * aborted the operation @@ -491,6 +494,17 @@ mpio_file_put(mpio_t *m, mpio_mem_t mem, BYTE *filename, } mpio_io_block_delete(m, mem, &backup); mpio_fatentry_set_free(m, mem, &backup); + + if (filesize > BLOCK_SIZE) + { + filesize -= BLOCK_SIZE; + } else { + filesize -= filesize; + } + + if (progress_callback) + (*progress_callback)((fsize-filesize), fsize); + } else { mpio_dentry_put(m, mem, filename, strlen(filename), |