Skip to content

Commit

Permalink
Simplify code.
Browse files Browse the repository at this point in the history
  • Loading branch information
T. H. Wright committed Sep 9, 2023
1 parent 5af825b commit aee0ecd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions jrnl/journals/FolderJournal.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,11 @@ def _get_files(self, journal_path: str) -> list[str]:
if self.config["extension"] is not None:
EXTENSIONSARRAYLENGTH = len (self.config["extension"])
EXTENSIONARRAY = self.config["extension"]
COUNTER = 0
if EXTENSIONSARRAYLENGTH > 0:
EXTENSIONS = "(txt"
for i in EXTENSIONARRAY:
COUNTER = COUNTER + 1
if COUNTER < EXTENSIONSARRAYLENGTH:
EXTENSIONS = EXTENSIONS + "|" + i
else:
EXTENSIONS = EXTENSIONS + "|" + i + ")"
EXTENSIONS = EXTENSIONS + "|" + i
EXTENSIONS = EXTENSIONS + ")"
else:
EXTENSIONS = "(txt)"
for year_folder in Folder._get_year_folders(pathlib.Path(journal_path)):
Expand Down

0 comments on commit aee0ecd

Please sign in to comment.