From c7528d6e3e722264d7c91b11fae217aa7166592f Mon Sep 17 00:00:00 2001 From: uz Date: Thu, 7 Apr 2011 20:58:03 +0000 Subject: [PATCH] Patch by groepaz to fix the problem that DEL files would appear as type DIR. git-svn-id: svn://svn.cc65.org/cc65/trunk@4983 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/cbm/cbm_dir.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libsrc/cbm/cbm_dir.c b/libsrc/cbm/cbm_dir.c index be044b844..e27813d25 100644 --- a/libsrc/cbm/cbm_dir.c +++ b/libsrc/cbm/cbm_dir.c @@ -13,7 +13,7 @@ -unsigned char __fastcall__ cbm_opendir (unsigned char lfn, unsigned char device) +unsigned char __fastcall__ cbm_opendir (unsigned char lfn, unsigned char device) { unsigned char status; if ((status = cbm_open (lfn, device, CBM_READ, "$")) == 0) { @@ -42,7 +42,7 @@ unsigned char __fastcall__ cbm_readdir (unsigned char lfn, register struct cbm_d unsigned char rv; unsigned char is_header; static const unsigned char types[] = { - CBM_T_OTHER, CBM_T_OTHER, CBM_T_CBM, CBM_T_DIR, /* a b c d */ + CBM_T_OTHER, CBM_T_OTHER, CBM_T_CBM, CBM_T_DEL, /* a b c d */ CBM_T_OTHER, CBM_T_OTHER, CBM_T_OTHER, CBM_T_OTHER, /* e f g h */ CBM_T_OTHER, CBM_T_OTHER, CBM_T_OTHER, CBM_T_OTHER, /* i j k l */ CBM_T_OTHER, CBM_T_OTHER, CBM_T_OTHER, CBM_T_PRG, /* m n o p */ @@ -120,7 +120,9 @@ unsigned char __fastcall__ cbm_readdir (unsigned char lfn, register struct cbm_d l_dirent->type = CBM_T_OTHER; } - cbm_k_basin(); + if ((cbm_k_basin() == 'i') && (l_dirent->type == CBM_T_DEL)) { + l_dirent->type = CBM_T_DIR; + } cbm_k_basin(); byte = cbm_k_basin(); -- 2.39.5