summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-03-16 07:44:38 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-03-16 15:33:58 +0100
commit5f8ed0d8dad90858018a63a324588724c3506caa (patch)
tree0d94e98c6d3399f6306f77fdb260de2bd4f64641
parentdosfs: msdos_filename_utf8_to_short_name_for_save (diff)
downloadrtems-5f8ed0d8dad90858018a63a324588724c3506caa.tar.bz2
dosfs: Fix long file name padding
Update #2934.
-rw-r--r--cpukit/libfs/src/dosfs/msdos_misc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpukit/libfs/src/dosfs/msdos_misc.c b/cpukit/libfs/src/dosfs/msdos_misc.c
index 09029e7a2e..0323c5578d 100644
--- a/cpukit/libfs/src/dosfs/msdos_misc.c
+++ b/cpukit/libfs/src/dosfs/msdos_misc.c
@@ -1760,10 +1760,11 @@ msdos_add_file (
#endif
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; ++i)
{
- if (!(*n == 0 && *(n+1) == 0))
+ if (*n != 0 || *(n + 1) != 0)
{
*p = *n;
- *(p+1) = *(n+1);
+ *(p + 1) = *(n + 1);
+ n += MSDOS_NAME_LFN_BYTES_PER_CHAR;
}
else
{
@@ -1771,7 +1772,6 @@ msdos_add_file (
p [1] = fill;
fill = 0xff;
}
- n += MSDOS_NAME_LFN_BYTES_PER_CHAR;
#if MSDOS_FIND_PRINT
printf ( "'%c''%c'", *p, *(p+1) );
#endif