Skip to content

Commit

Permalink
Create App Directory, Fix Initialization GUI on First Run
Browse files Browse the repository at this point in the history
- 588f598 Pass empty list of `input_files` to `FileBrowser` on first run
- 3ddffdf Create config directory before setting up logging to file under it

Resolves #78
Resolves #79
Resolves #80
  • Loading branch information
debanjum authored Sep 9, 2022
2 parents 79894ef + 588f598 commit b58b7d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/interface/desktop/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def add_settings_panel(self, current_content_config: dict, search_type: SearchTy
search_type_layout = QtWidgets.QVBoxLayout(search_type_settings)
enable_search_type = SearchCheckBox(f"Search {search_type.name}", search_type)
# Add file browser to set input files for given search type
input_files = FileBrowser(file_input_text, search_type, current_content_files)
input_files = FileBrowser(file_input_text, search_type, current_content_files or [])

# Set enabled/disabled based on checkbox state
enable_search_type.setChecked(current_content_files is not None and len(current_content_files) > 0)
Expand Down
3 changes: 3 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ def run():
args = cli(state.cli_args)
set_state(args)

# Create app directory, if it doesn't exist
state.config_file.parent.mkdir(parents=True, exist_ok=True)

# Setup Logger
if args.verbose == 0:
logger.setLevel(logging.WARN)
Expand Down

0 comments on commit b58b7d7

Please sign in to comment.