Skip to content

Malformed storage metadata can crash with traceback instead of user-facing error#2154

Merged
lra merged 13 commits into
masterfrom
malformed_data
Feb 17, 2026
Merged

Malformed storage metadata can crash with traceback instead of user-facing error#2154
lra merged 13 commits into
masterfrom
malformed_data

Conversation

@lra
Copy link
Copy Markdown
Owner

@lra lra commented Feb 16, 2026

Improves error handling and robustness for Dropbox and Google Drive folder location detection in src/mackup/utils.py, and adds corresponding unit tests in tests/test_utils.py.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves error handling for malformed storage metadata in Dropbox and Google Drive folder location detection functions. Previously, malformed metadata could cause the application to crash with a traceback; now it provides user-facing error messages.

Changes:

  • Enhanced get_dropbox_folder_location() to validate host.db format and handle decoding errors gracefully
  • Enhanced get_google_drive_folder_location() to handle missing database entries and SQLite errors
  • Added unit tests for malformed Dropbox host.db and missing Google Drive path entries

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/mackup/utils.py Added validation and comprehensive exception handling for Dropbox and Google Drive folder detection
tests/test_utils.py Added tests verifying graceful error handling for malformed storage metadata

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/mackup/utils.py
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_utils.py
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/mackup/utils.py Outdated
lra and others added 2 commits February 17, 2026 00:57
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/mackup/utils.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/mackup/utils.py Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@lra lra requested a review from Copilot February 17, 2026 00:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lra lra merged commit 9dc0b32 into master Feb 17, 2026
37 checks passed
@lra lra deleted the malformed_data branch February 17, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants