diff options
author | 2021-05-04 21:29:21 +0200 | |
---|---|---|
committer | 2021-05-09 18:17:35 +0200 | |
commit | 4fd36891830912d635a3a4c79bb8ee641091df52 (patch) | |
tree | 2b677586aa2213acea1e03816f6a2a370294b934 /src/lib/formats/fsmgr.cpp | |
parent | 628fa01ed67b9080afe584fd91443602dc3c06fc (diff) |
prodos: experiements in directory tree reading.
Diffstat (limited to 'src/lib/formats/fsmgr.cpp')
-rw-r--r-- | src/lib/formats/fsmgr.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/lib/formats/fsmgr.cpp b/src/lib/formats/fsmgr.cpp index 2f49c3cbed9..2b15b1aeb93 100644 --- a/src/lib/formats/fsmgr.cpp +++ b/src/lib/formats/fsmgr.cpp @@ -18,24 +18,27 @@ void fs_refcounted_inner::ref_weak() m_weak_ref ++; } -void fs_refcounted_inner::unref() +bool fs_refcounted_inner::unref() { m_ref --; if(m_ref == 0) { - if(m_weak_ref) { + if(m_weak_ref) drop_weak_references(); - if(m_weak_ref) - fatalerror("drop_weak_references kept %d active references\n", m_weak_ref); - } else + else delete this; + return true; } + return false; } -void fs_refcounted_inner::unref_weak() +bool fs_refcounted_inner::unref_weak() { m_weak_ref --; - if(m_weak_ref == 0 && m_ref == 0) + if(m_weak_ref == 0 && m_ref == 0) { delete this; + return true; + } + return false; } @@ -266,12 +269,13 @@ const char *fs_meta_get_name(fs_meta_name name) case fs_meta_name::length: return "length"; case fs_meta_name::loading_address: return "loading_address"; case fs_meta_name::locked: return "locked"; - case fs_meta_name::sequential: return "sequential"; case fs_meta_name::modification_date: return "modification_date"; case fs_meta_name::name: return "name"; - case fs_meta_name::size_in_blocks: return "size_in_blocks"; - case fs_meta_name::os_version: return "os_version"; case fs_meta_name::os_minimum_version: return "os_minimum_version"; + case fs_meta_name::os_version: return "os_version"; + case fs_meta_name::rsrc_length: return "rsrc_length"; + case fs_meta_name::sequential: return "sequential"; + case fs_meta_name::size_in_blocks: return "size_in_blocks"; } return ""; } |