Skip to content

Commit eacb7e4

Browse files
committed
fix:修复 Windows 下批量重命名文件列表显示完整路径的问题
1 parent e8dcb0b commit eacb7e4

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "youran-toolbox",
33
"private": true,
4-
"version": "0.0.6",
4+
"version": "0.0.7",
55
"type": "module",
66
"scripts": {
77
"dev": "vite dev",

src/routes/rename/+page.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@
129129
130130
for (const path of paths) {
131131
const info = await stat(path);
132-
const name = path.split('/').pop() || path.split('\\').pop() || path;
132+
const sep = getPathSeparator(path);
133+
const name = path.split(sep).pop() || path;
133134
134135
items.push({
135136
path,

0 commit comments

Comments
 (0)