We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a6bee7a + 670722b commit 79669ecCopy full SHA for 79669ec
web/src/api/utils/file.ts
@@ -20,7 +20,7 @@ export function commonFilenamePrefix(files: File[]): string {
20
//debugger;
21
const first = files[0].path;
22
// Find all possible locations with a path separator, sort them descending
23
- const splitLocations = Array.from(first.matchAll(/[\\/]/g)).map(r => r.index).sort().reverse();
+ const splitLocations = Array.from(first.matchAll(/[\\/]/g)).map(r => r.index).sort((a, b) => b - a);
24
/// If there are none, there is no desirable prefix
25
if (splitLocations.length == 0) {
26
return "";
0 commit comments