Skip to content

Commit

Permalink
housekeeping: fix last project shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
KellyMWhitehead authored and philipbaileynar committed Dec 13, 2024
1 parent b647f70 commit 4f9a18c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/qris_toolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,13 @@ def run(self):
settings = QtCore.QSettings(ORGANIZATION, APPNAME)
last_project_folder = settings.value(LAST_PROJECT_FOLDER)
if last_project_folder is not None and os.path.isdir(last_project_folder):
project_file = os.path.join(last_project_folder, f'{os.path.basename(last_project_folder)}.gpkg')
# find the project gpkg file in the last project folder only
project_file = None
for file in os.listdir(last_project_folder):
if file.endswith('.gpkg'):
project_file = os.path.join(last_project_folder, file)
break
# project_file = os.path.join(last_project_folder, f'{os.path.basename(last_project_folder)}.gpkg')
if os.path.isfile(project_file):
self.open_qris_project(project_file)

Expand Down

0 comments on commit 4f9a18c

Please sign in to comment.