From e37e550bf13b92a6d93336231f9e242eae462e8c Mon Sep 17 00:00:00 2001 From: Eduardo Casino Date: Mon, 30 Dec 2024 21:37:27 +0100 Subject: [PATCH] Fix attr command --- apps/attr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/attr.c b/apps/attr.c index 130dbb14..8e1e0cad 100644 --- a/apps/attr.c +++ b/apps/attr.c @@ -109,8 +109,6 @@ int main() while (r != 0xff) { DIRE* de = (DIRE*)cpm_default_dma + r; - if (de->rc == 0x80) - continue; if (modify) { @@ -122,6 +120,10 @@ int main() de->us = dr; /* Convert to an FCB */ cpm_set_file_attributes((FCB*)de); + + /* cpm_set_file_attributes() resets directory index, so */ + /* recover index for last file match */ + cpm_findfirst((FCB*)de); } cpm_conout((de->f[8] & 0x80) ? 'R' : '-');