Skip to content

Commit

Permalink
feat: 上传前删除同名文件
Browse files Browse the repository at this point in the history
  • Loading branch information
Cnotech committed Jul 26, 2024
1 parent 1801fb2 commit 02de5e3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cloud189.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ function uploadToRemote(fileName: string, category: string): boolean {

try {
log("Info:Uploading " + fileName);
// 先尝试移除这个文件
deleteFromRemote(fileName, category, true);
cp.execSync(`cloud189 up "${localPath}" ${remotePath}`);
} catch (err: any) {
console.log(err?.output.toString());
Expand Down

0 comments on commit 02de5e3

Please sign in to comment.