Create tags directory if needed

main
Bob Mottram 2020-12-11 11:21:50 +00:00
parent 92c555d732
commit d1a16c486c
1 changed files with 2 additions and 0 deletions

View File

@ -149,6 +149,8 @@ def setHashtagCategory(baseDir: str, hashtag: str, category: str,
if not os.path.isfile(hashtagFilename):
return False
if not os.path.isdir(baseDir + '/tags'):
os.mkdir(baseDir + '/tags')
categoryFilename = baseDir + '/tags/' + hashtag + '.category'
if force:
# don't overwrite any existing categories