diff --git a/src/tribler/ui/src/dialogs/SelectRemotePath.tsx b/src/tribler/ui/src/dialogs/SelectRemotePath.tsx
index 3fb39aca85..36241b1f27 100644
--- a/src/tribler/ui/src/dialogs/SelectRemotePath.tsx
+++ b/src/tribler/ui/src/dialogs/SelectRemotePath.tsx
@@ -72,7 +72,7 @@ export default function SelectRemotePath(props: SelectRemotePathProps & JSX.Intr
                             >
                                 {item.dir && <Folder className="pr-2" />}
                                 {!item.dir && <FileIcon className="pr-2" />}
-                                {item.name}
+                                <span className="break-all line-clamp-1">{item.name}</span>
                             </div>
                         ))}
                     </div>