Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information