Skip to content

Commit

Permalink
OS.Path相关函数替换
Browse files Browse the repository at this point in the history
  • Loading branch information
redleafnew committed Aug 6, 2023
1 parent 7870d7c commit c05e616
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "delitemwithatt",
"version": "0.2.1",
"version": "0.2.2",
"description": "Delete item(s) with attachment(s)",
"config": {
"addonName": "Del Item With Attachment",
Expand Down
14 changes: 7 additions & 7 deletions src/modules/examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -807,9 +807,9 @@ export class HelperExampleFactory {
try {
// await exportAtts(file, expDir);

var baseName = OS.Path.basename(file); //得到文件名
var destName = OS.Path.join(expDir, baseName);
OS.File.copy(file, destName); // 尝试导出文件
var baseName = PathUtils.filename(file); //得到文件名
var destName = PathUtils.join(expDir, baseName);
IOUtils.copy(file, destName); // 尝试导出文件
nSucess++;
//BasicExampleFactory.exortSucess(); // 导出成功提示
} catch (error) { // 弹出错误
Expand All @@ -831,13 +831,13 @@ export class HelperExampleFactory {
// var baseName = OS.Path.basename(file); //得到文件名
// var destName = OS.Path.join(expDir, baseName);
// OS.File.copy(file, destName); // 尝试导出文件
var baseName = OS.Path.basename(file); //得到文件名
var destName = OS.Path.join(expDir, baseName);
OS.File.copy(file, destName); // 尝试导出文件
var baseName = PathUtils.filename(file); //得到文件名
var destName = PathUtils.join(expDir, baseName);
IOUtils.copy(file, destName); // 尝试导出文件
// OS.Path.join(replacement: PathUtils.join ? joinRelative ?)
// OS.Path.basename(replacement: PathUtils.filename)
// OS.Path.dirname(replacement: PathUtils.parent)

// await IOUtils.copy(srcPath, destPath);
nSucess++;
//BasicExampleFactory.exortSucess(); // 导出成功提示

Expand Down
2 changes: 1 addition & 1 deletion update.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
},
{
"version": "0.2.1",
"version": "0.2.2",
"update_link": "https://github.com/redleafnew/delitemwithatt/releases/latest/download/delitemwithatt.xpi",
"applications": {
"zotero": {
Expand Down

0 comments on commit c05e616

Please sign in to comment.