From bc50613dda901cfc46d8c9efc417b35238ef0e11 Mon Sep 17 00:00:00 2001 From: Bobbi Webber-Manners Date: Sun, 1 Mar 2020 15:27:52 -0500 Subject: [PATCH] Fixed bug - fixes to dir header were not written to disk --- bobbi/sortdir.c#b00008 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/bobbi/sortdir.c#b00008 b/bobbi/sortdir.c#b00008 index c33b8a3..d1ba532 100644 --- a/bobbi/sortdir.c#b00008 +++ b/bobbi/sortdir.c#b00008 @@ -880,9 +880,9 @@ int readdir(uint device, uint blocknum) { printf(" %s)\n", filecount == 1 ? "entry" : "entries"); hline(); - /* Copy pointers and header to sorteddata[], zero the rest */ + /* Copy pointers to sorteddata[], zero the rest */ bzero(curblk->sorteddata, BLKSZ); - memcpy(curblk->sorteddata, curblk->data, PTRSZ + entsz); + memcpy(curblk->sorteddata, curblk->data, PTRSZ); #ifdef CHECK if (entsz != 0x27) { @@ -1420,6 +1420,7 @@ void copyent(uint srcblk, uint srcent, uint dstblk, uint dstent, uint device) { * blocks. Note that the block and entry numbers are 1-based indices. */ void sortblocks(uint device) { + copyent(1, 1, 1, 1, device); /* Copy directory header */ uchar destblk = 1; uchar destentry = 2; /* Skip header on first block */ for(uint i=0; i