st-one-io / node-red-contrib-smb

Node of Node-RED for SMB Protocol.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[error] Error: STATUS_OBJECT_NAME_COLLISION (0xC0000035) : The object name already exists.

mirzafaraz82 opened this issue · comments

Hello.
My question is simple, I am using the operation "Create file" in order to create a new file, & for a new file it works absolutely fine, but when a file with same name already exists, then the complete NodeRed crashes.
Here a screenshot of my log message:
Screenshot 2022-05-01 115226

Question:

case "create":

                let data = "";
                if (msg.hasOwnProperty("payload")) {
                    data = msg.payload;
                }
                node.statusProcess();
                node.config.writeFile(filename, data, (err) => {
                   if (err) {
                        node.statusError();
                        done(err);
                        return;
                    }
                    node.statusDone();
                    send(msg);
                    done();
                });
                break;

While debugging I found that the code is going into "if (err)" statement above and then returning into the below code and then suddenly everything stops.

writeFile.catch((err) => {
callback(err);
connect();
});

@gfcittolin Is this a bug in the Code or am I missing something. Please help me out in this. Thanks in advance.

Regards

Is there any timeout issue which I need to set? Please me figure this out. @gfcittolin