Sort with numeric compare on files

master
Luminarys 2019-06-14 22:56:20 -07:00 committed by Drew DeVault
parent 1dc0775625
commit 585d465952
1 changed files with 1 additions and 1 deletions

View File

@ -279,7 +279,7 @@ class Torrent extends Component {
<div className="files flex-table" style={{marginBottom: "0"}}>
{this.state.filesShown
? files.slice()
.sort((a, b) => a.path.localeCompare(b.path))
.sort((a, b) => a.path.localeCompare(b.path, undefined, {numeric: true}))
.map(file => <File
dispatch={dispatch}
file={file}