Skip to content

Commit

Permalink
Added 550 to handle IIS rename failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Joffcom committed Nov 5, 2024
1 parent 7263a77 commit 84fc2f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nodes-base/nodes/Ftp/Ftp.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ export class Ftp implements INodeType {
try {
await ftp!.rename(oldPath, newPath);
} catch (error) {
if (error.code === 451 && options.createDirectories) {
if ([451, 550].includes(error.code) && options.createDirectories) {
const dirPath = newPath.replace(basename(newPath), '');
await ftp!.mkdir(dirPath, true);
await ftp!.rename(oldPath, newPath);
Expand Down

0 comments on commit 84fc2f9

Please # to comment.