Sort with numeric compare on files

This commit is contained in:
Luminarys 2019-06-14 22:56:20 -07:00 committed by Drew DeVault
parent 1dc0775625
commit 585d465952

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}