Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8ab5e9e

Browse files
authored
Merge pull request#47 from Konnng/fix/remove-dir
Fixing folder 550 delete action
2 parents9039859 +dc0ecf6 commit8ab5e9e

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

‎src/syncProvider.ts‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class FTPSyncProvider implements ISyncProvider {
5050

5151
/**
5252
* Converts a file path (ex: "folder/otherfolder/file.txt") to an array of folder and a file path
53-
*@param fullPath
53+
*@param fullPath
5454
*/
5555
privategetFileBreadcrumbs(fullPath:string):IFilePath{
5656
// todo see if this regex will work for nonstandard folder names
@@ -110,7 +110,7 @@ export class FTPSyncProvider implements ISyncProvider {
110110
}
111111
catch(e:any){
112112
// this error is common when a file was deleted on the server directly
113-
if(e.code===ErrorCode.FileNotFoundOrNoAccess){
113+
if(e?.code===ErrorCode.FileNotFoundOrNoAccess){
114114
this.logger.standard("File not found or you don't have access to the file - skipping...");
115115
}
116116
else{
@@ -128,7 +128,17 @@ export class FTPSyncProvider implements ISyncProvider {
128128
this.logger.all(`removing folder "${absoluteFolderPath}"`);
129129

130130
if(this.dryRun===false){
131-
awaitretryRequest(this.logger,async()=>awaitthis.client.removeDir(absoluteFolderPath));
131+
try{
132+
awaitretryRequest(this.logger,async()=>awaitthis.client.removeDir(absoluteFolderPath));
133+
}
134+
catch(e:any){
135+
if(e?.code===ErrorCode.FileNotFoundOrNoAccess){
136+
this.logger.standard("Directory not found or you don't have access to the file - skipping...");
137+
}
138+
else{
139+
throwe;
140+
}
141+
}
132142
}
133143

134144
this.logger.verbose(` completed`);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp