Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "ValueError: relative path can't be expressed as a file URI" #7764

Merged
merged 1 commit into from Jan 9, 2024

Commits on Jan 8, 2024

  1. Fix "ValueError: relative path can't be expressed as a file URI"

    This commit adds a new test case to the `test_tribler_window.py` file. The test checks that the `on_add_torrent_browse_file` method in the `TriblerWindow` class works correctly. It mocks certain methods and uses patching to simulate user interaction with a file dialog. The test verifies that the appropriate methods are called and asserts their expected behavior.
    
    The code changes in `tribler_window.py` modify the implementation of the `on_add_torrent_browse_file` method. It now handles cases where no filenames are selected from the file dialog, preventing unnecessary processing. Additionally, it resolves each filename to its absolute URI path before appending it to the list of pending URI requests.
    
    These changes improve the functionality and reliability of adding torrent files through browsing in TriblerWindow.
    drew2a committed Jan 8, 2024
    Copy the full SHA
    576a557 View commit details
    Browse the repository at this point in the history