changeset 152:97a597b0afcd

Linux version
author kono
date Thu, 17 Jan 2019 16:54:05 +0900
parents ef5959682d03
children e57b2d131e6c
files src/vdisk.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/vdisk.c	Thu Jan 17 16:32:19 2019 +0900
+++ b/src/vdisk.c	Thu Jan 17 16:54:05 2019 +0900
@@ -342,9 +342,10 @@
         int j = 0;
         for(j = 0; j < DIR_NM ; j++) {
             if (j< dp->d_namlen)  {
-               pd->dirfp[i+j] = dp->d_name[j]&0x7f;
-               if (j== dp->d_namlen-1)  
+               pd->dirfp[i+j] = dp->d_name[j]&0x7f;  // this is wrong but os9 does not allow 8th bit
+               if (j== dp->d_namlen-1 || dp->d_name[j+1]==0) {
                   pd->dirfp[i+j] |= 0x80;    // os9 EOL
+               }
             } else
                pd->dirfp[i+j] = 0;
         }