Skip to content

Commit e3b06a1

Browse files
committed
fix(filelist): properly set unzip state
1 parent 8b9f3ab commit e3b06a1

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

src/rovr/core/file_list.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -721,9 +721,9 @@ async def on_option_list_option_highlighted(
721721
)
722722
return
723723
if not self.select_mode:
724-
self.app.query_one("#unzip").update_state(
725-
path_utils.normalise(highlighted_option.dir_entry.path) or []
726-
)
724+
self.app.query_one("#unzip").update_state([
725+
path_utils.normalise(highlighted_option.dir_entry.path)
726+
])
727727

728728
@work(thread=True)
729729
def set_mtime(self, option: FileListSelectionWidget) -> None:

tests/test_pinned_sidebar.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import contextlib
12
import os
23
import sys
34
from pathlib import Path
45

56
import pytest
7+
from textual.worker import WorkerCancelled
68

79
from .conftest import iter_until
810

@@ -90,7 +92,9 @@ async def test_add_pins(tmp_path: Path) -> None:
9092
test.mkdir()
9193
pins.add_pin("TestFolder", test.as_posix())
9294
worker: Worker = sidebar.reload_pins()
93-
await worker.wait()
95+
# issok, just continue
96+
with contextlib.suppress(WorkerCancelled):
97+
await worker.wait()
9498
await pilot.pause()
9599
found: bool = False
96100
found_at: int | None = None

0 commit comments

Comments
 (0)