diff --git a/__pycache__/custom_file_dialog.cpython-312.pyc b/__pycache__/custom_file_dialog.cpython-312.pyc index e8312d5..de4d91e 100644 Binary files a/__pycache__/custom_file_dialog.cpython-312.pyc and b/__pycache__/custom_file_dialog.cpython-312.pyc differ diff --git a/custom_file_dialog.py b/custom_file_dialog.py index 6ee5782..6a6ac8c 100644 --- a/custom_file_dialog.py +++ b/custom_file_dialog.py @@ -518,7 +518,7 @@ class CustomFileDialog(tk.Toplevel): else: icon, file_type, size = self.get_file_icon( name, 'small'), "Datei", self._format_size(stat.st_size) - self.tree.insert("", "end", text=name, image=icon, values=( + self.tree.insert("", "end", text=f" {name}", image=icon, values=( size, file_type, modified_time)) except (FileNotFoundError, PermissionError): continue @@ -541,7 +541,7 @@ class CustomFileDialog(tk.Toplevel): if not self.tree.selection(): return item_id = self.tree.selection()[0] - item_text = self.tree.item(item_id, 'text') + item_text = self.tree.item(item_id, 'text').strip() self.selected_file = os.path.join(self.current_dir, item_text) self.update_status_bar() @@ -565,7 +565,7 @@ class CustomFileDialog(tk.Toplevel): if not self.tree.selection(): return item_id = self.tree.selection()[0] - item_text = self.tree.item(item_id, 'text') + item_text = self.tree.item(item_id, 'text').strip() path = os.path.join(self.current_dir, item_text) if self._handle_unsupported_file(path): return