Skip to content

Commit

Permalink
Fixed state dir path reconstruction only working for UNIX (#7762)
Browse files Browse the repository at this point in the history
  • Loading branch information
qstokkink committed Dec 8, 2023
1 parent da413e2 commit 0d9a839
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/tribler/gui/widgets/settingspage.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,8 @@ def dir_from_checkbox_text(checkbox):
# eg text: "/home/<user>/.Tribler/v7.8 5 GB"
state_dir = checkbox.text().rpartition(" ")[0]
if not state_dir.startswith(root_version_dir):
return None # safety check just for case
state_dir = state_dir[len(root_version_dir):]
if state_dir.startswith('/'):
state_dir = state_dir[1:]
return state_dir
return None # safety check just in case
return Path(state_dir).parts[-1]

dirs_selected_for_deletion = []
for checkbox in self.window().state_dir_list.findChildren(QCheckBox):
Expand Down

0 comments on commit 0d9a839

Please sign in to comment.