Function to test for account directories

This commit is contained in:
bashrc committed 2021-06-07 10:10:52 +01:00
1 parent 688082f897
commit fc3a5c664c
6 files changed
+20 -15

No files matched your search

+2 -3
View File
@@ -9,6 +9,7 @@ __status__ = "Production"
import os
import json
from datetime import datetime
from utils import isAccountDir
from utils import getCachedPostFilename
from utils import loadJson
from utils import saveJson
@@ -660,9 +661,7 @@ def setBrochMode(baseDir: str, domainFull: str, enabled: bool) -> None:
followFiles = ('following.txt', 'followers.txt')
for subdir, dirs, files in os.walk(baseDir + '/accounts'):
for acct in dirs:
if '@' not in acct:
continue
if 'inbox@' in acct or 'news@' in acct:
if not isAccountDir(acct):
continue
accountDir = os.path.join(baseDir + '/accounts', acct)
for followFileType in followFiles: