diff --git a/src/lib/upload/index.ts b/src/lib/upload/index.ts index 831b8cc..df4194f 100644 --- a/src/lib/upload/index.ts +++ b/src/lib/upload/index.ts @@ -102,10 +102,22 @@ export async function scanFiles(item: FileSystemEntry, files: Promise = {}; const mangas: string[] = []; + const files = _files.sort((a, b) => { + if (a.name < b.name) { + return -1; + } + + if (a.name > b.name) { + return 1; + } + + return 0; + }); + for (const file of files) { const { ext, filename, path } = getDetails(file);