Skip to content

Commit 521991f

Browse files
committed
fix: Correct variable name and improve logic for app data folder existence check
1 parent b4ddfbf commit 521991f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

config2py/util.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -467,11 +467,10 @@ def get_app_folder(
467467
app_data_path = os.path.join(
468468
get_app_rootdir(folder_kind, ensure_exists=ensure_exists), app_name
469469
)
470-
app_data_folder_did_not_exist = not os.path.isdir(app_data_path)
471-
# process_path(app_data_path, ensure_dir_exists=True)
470+
app_data_folder_does_not_exist = not os.path.isdir(app_data_path)
472471

473-
if app_data_folder_did_not_exist:
474-
setup_callback(app_data_path)
472+
if app_data_folder_does_not_exist and ensure_exists:
473+
setup_callback(app_data_path, ensure_exists=ensure_exists)
475474
return app_data_path
476475

477476

0 commit comments

Comments
 (0)