Spaces:
Runtime error
Runtime error
Merge pull request #92 from starsnatched/codex/fix-file-name-display-in-gradio-frontend
Browse files- gradio_app.py +2 -2
gradio_app.py
CHANGED
@@ -68,14 +68,14 @@ async def list_dir(path: str, session: str, token: OAuthToken):
|
|
68 |
output = await _vm_execute(user, session, cmd)
|
69 |
if output.startswith("ls:"):
|
70 |
return []
|
71 |
-
entries = []
|
72 |
for line in output.splitlines():
|
73 |
line = line.strip()
|
74 |
if not line or line in (".", ".."):
|
75 |
continue
|
76 |
is_dir = line.endswith("/")
|
77 |
name = line[:-1] if is_dir else line
|
78 |
-
entries.append(
|
79 |
return entries
|
80 |
|
81 |
|
|
|
68 |
output = await _vm_execute(user, session, cmd)
|
69 |
if output.startswith("ls:"):
|
70 |
return []
|
71 |
+
entries: list[list[str | bool]] = []
|
72 |
for line in output.splitlines():
|
73 |
line = line.strip()
|
74 |
if not line or line in (".", ".."):
|
75 |
continue
|
76 |
is_dir = line.endswith("/")
|
77 |
name = line[:-1] if is_dir else line
|
78 |
+
entries.append([name, is_dir])
|
79 |
return entries
|
80 |
|
81 |
|