Fix file selection window on Windows that didnt split file with proper separator
This commit is contained in:
parent
b808382169
commit
b289f1eeaa
6 changed files with 47 additions and 40 deletions
|
|
@ -1,10 +0,0 @@
|
|||
import { TorrentDetails } from "../api-types";
|
||||
|
||||
export function getLargestFileName(torrentDetails: TorrentDetails): string {
|
||||
const largestFile = torrentDetails.files
|
||||
.filter((f) => f.included)
|
||||
.reduce((prev: any, current: any) =>
|
||||
prev.length > current.length ? prev : current
|
||||
);
|
||||
return largestFile.name;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue