@@ -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 */
5555private getFileBreadcrumbs ( 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}
111111catch ( 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 ) {
114114this . logger . standard ( "File not found or you don't have access to the file - skipping..." ) ;
115115}
116116else {
@@ -128,7 +128,17 @@ export class FTPSyncProvider implements ISyncProvider {
128128this . logger . all ( `removing folder "${ absoluteFolderPath } "` ) ;
129129
130130if ( this . dryRun === false ) {
131- await retryRequest ( this . logger , async ( ) => await this . client . removeDir ( absoluteFolderPath ) ) ;
131+ try {
132+ await retryRequest ( this . logger , async ( ) => await this . 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+ throw e ;
140+ }
141+ }
132142}
133143
134144this . logger . verbose ( ` completed` ) ;