fix(FileExplorer): normalize path handling for parent directory navigation

Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
2025-06-26 21:10:44 +05:00
parent 8184a0bc71
commit dc06f78c43

View File

@ -172,10 +172,12 @@ class FileExplorer(QDialog):
full_path = os.path.join(self.current_path, selected) full_path = os.path.join(self.current_path, selected)
if os.path.isdir(full_path): if os.path.isdir(full_path):
self.current_path = full_path # Если выбрана директория, нормализуем путь
self.current_path = os.path.normpath(full_path)
self.update_file_list() self.update_file_list()
else: else:
self.file_signal.file_selected.emit(full_path) # Для файла отправляем нормализованный путь
self.file_signal.file_selected.emit(os.path.normpath(full_path))
self.accept() self.accept()
def update_file_list(self): def update_file_list(self):