提交 42ab5840 编写于 作者: K Krzysztof Cieslak

Add case for prefix version for folder

上级 e0cafdb5
......@@ -1081,6 +1081,11 @@ function incrementFileName(name: string, isFolder: boolean): string {
return name.replace(/(\d+)$/, (match: string, ...groups: any[]) => { return String(parseInt(groups[0]) + 1); });
}
// 1.folder=>2.folder
if (isFolder && name.match(/^(\d+)/)) {
return name.replace(/^(\d+)/, (match: string, ...groups: any[]) => { return String(parseInt(groups[0]) + 1); });
}
// file/folder=>file.1/folder.1
return strings.format('{0}.1', name);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册