Skip to content

Commit

Permalink
Fix crash if driveoff home folder is not created
Browse files Browse the repository at this point in the history
  • Loading branch information
uoa-noel committed Nov 18, 2024
1 parent c5e4d5d commit c97b0dd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
from models.role import prepopulate_roles
from models.services import ResearchDriveService, Services

# Ensure driveoff directory is created
(Path.home() / ".driveoff").mkdir(exist_ok=True)
DB_FILE_NAME = Path.home() / ".driveoff" / "database.db"
DB_URL = f"sqlite:///{DB_FILE_NAME}"

Expand Down

0 comments on commit c97b0dd

Please sign in to comment.