From 68e7a30c8eccf4655449525a331de6a3264c7b89 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 10 Feb 2022 15:07:09 +0000 Subject: [PATCH] Actor is not an account directory --- follow.py | 4 +++- utils.py | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/follow.py b/follow.py index 3c406776f..73fc2eb90 100644 --- a/follow.py +++ b/follow.py @@ -1367,7 +1367,9 @@ def get_followers_of_actor(base_dir: str, actor: str, debug: bool) -> {}: # for each of the accounts for subdir, dirs, _ in os.walk(base_dir + '/accounts'): for account in dirs: - if '@' in account and not account.startswith('inbox@'): + if '@' in account and \ + not account.startswith('inbox@') and \ + not account.startswith('Actor@'): following_filename = \ os.path.join(subdir, account) + '/following.txt' if debug: diff --git a/utils.py b/utils.py index b03a719df..d6d31effe 100644 --- a/utils.py +++ b/utils.py @@ -605,6 +605,7 @@ def get_followers_of_person(base_dir: str, filename = os.path.join(subdir, account) + '/' + follow_file if account == handle or \ account.startswith('inbox@') or \ + account.startswith('Actor@') or \ account.startswith('news@'): continue if not os.path.isfile(filename): @@ -1336,7 +1337,7 @@ def clear_from_post_caches(base_dir: str, recent_posts_cache: {}, for acct in dirs: if '@' not in acct: continue - if acct.startswith('inbox@'): + if acct.startswith('inbox@') or acct.startswith('Actor@'): continue cache_dir = os.path.join(base_dir + '/accounts', acct) post_filename = cache_dir + filename @@ -2893,7 +2894,7 @@ def is_account_dir(dir_name: str) -> bool: """ if '@' not in dir_name: return False - if 'inbox@' in dir_name or 'news@' in dir_name: + if 'inbox@' in dir_name or 'news@' in dir_name or 'Actor@' in dir_name: return False return True