diff options
author | germeier <germeier> | 2002-10-17 22:49:26 +0000 |
---|---|---|
committer | germeier <germeier> | 2002-10-17 22:49:26 +0000 |
commit | 723b01c9719b896f35df94bea44fb186d7f9e408 (patch) | |
tree | 998d7394ea1f4591ea3bb5801f6b38f6b6d0ee0f /libmpio | |
parent | 265351f4c765782ee942d88c5ee6e9abbcc4c172 (diff) | |
download | mpiosh-723b01c9719b896f35df94bea44fb186d7f9e408.tar.gz mpiosh-723b01c9719b896f35df94bea44fb186d7f9e408.tar.bz2 mpiosh-723b01c9719b896f35df94bea44fb186d7f9e408.zip |
another fix for the 8.3 handling
Diffstat (limited to 'libmpio')
-rw-r--r-- | libmpio/directory.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/libmpio/directory.c b/libmpio/directory.c index ea51ac3..d3cd677 100644 --- a/libmpio/directory.c +++ b/libmpio/directory.c @@ -1,6 +1,6 @@ /* * - * $Id: directory.c,v 1.7 2002/09/24 15:38:03 germeier Exp $ + * $Id: directory.c,v 1.8 2002/10/17 22:49:27 germeier Exp $ * * Library for USB MPIO-* * @@ -213,7 +213,7 @@ mpio_dentry_get_real(mpio_t *m, mpio_mem_t mem, BYTE *buffer, BYTE *uc; BYTE *fname = 0; iconv_t ic; - int dsize; + int dsize, i; if (buffer == NULL) return -1; @@ -269,9 +269,15 @@ mpio_dentry_get_real(mpio_t *m, mpio_mem_t mem, BYTE *buffer, free(unicode); memcpy(filename_8_3, dentry->name, 8); - filename_8_3[0x08] = '.'; - memcpy(filename_8_3 + 0x09, dentry->ext, 3); - filename_8_3[0x0c] = 0; + i=8; + while(filename_8_3[i-1]==' ') + i--; + filename_8_3[i++] = '.'; + memcpy(filename_8_3 + i, dentry->ext, 3); + i+=3; + while(filename_8_3[i-1]==' ') + i--; + filename_8_3[i] = 0; hexdumpn(4, filename_8_3, 13); if (!vfat) |