Disallow going above the initial directory

This commit is contained in:
Jan Hamal Dvořák 2025-03-10 20:17:26 +01:00
parent 6695e6b07f
commit 0655290232
Signed by: mordae
GPG key ID: 1782BCC23EE007B9

View file

@ -491,9 +491,6 @@ class MainWindow(Gtk.ApplicationWindow):
def _populate_file_list(self) -> None:
items: list[FileItem] = []
# Add parent directory
items.append(FileItem("..", FileType.DIRECTORY, Path("..").resolve()))
for entry in os.scandir():
if entry.name.startswith("."):
continue