dynamicdan/sn-filesync

issue saving, not uploading local changes to instance

Closed this issue · 5 comments

Trying to set this up. I wanted to include inbound actions, and I have them downloading but when I try to edit a file, once I save, it resyncs the instance version over my update.

What command do you use to start FileSync? What is your project/directory setup looking like?
Have you tried using a different editor (eg. one without "atomic saves")?

What folder config did you add for this inbound action? By default I don't think there is any configuration for it in lib/records.config.json.

Command I use to start;
node bin/app.js --config app.config.json
I added the following to the app.config.json in the folders object;
"inbound_actions": { "table": "sysevent_in_email_action", "key": "name", "fields":{ "js": "script" }, "subDirPattern": "table" },

I did just now try a different editor and it works. I guess Visual Studio Code must do this atomic saves. I'll have to look to see if there's a way to turn it off or go back to brackets.

Not sure how to change Visual Studio Code, but it must be how it saves as this works fine with notepad, and Brackets.io.

I'm not entirely sure what causes it but it is some kind of race condition to do with the file being emptied and then filesync seeing it and then the file being written out correctly. Sounds like atomic save logic but we actually have a solution to get around that. Maybe there is regression. I'll look into that.

I'm not sure how I can help, but if I can, let me know.