Open pgattu opened 3 years ago
I have a similar bug, but in reverse mode... If I set uploadOnSave: false, still upload files to server...
I had the same issue.
tried to switch "uploadOnSave" to false
and back to true
.
But after setting debug on true
and reloading (restarting vscode). I could see that it worked.
You can view the debug terminal in the tab "output" in terminal windows. then select the options "ftp-sync".
I am using this config.
{
"remotePath": "/html/workspace",
"host": "***************",
"username": "***************",
"password": "***************",
"port": 21,
"secure": false,
"protocol": "ftp",
"uploadOnSave": true,
"passive": false,
"debug": true,
"privateKeyPath": null,
"passphrase": null,
"agent": null,
"allow": [
],
"ignore": [
"\\.vscode",
"\\.git"
],
"generatedFiles": {
"extensionsToInclude": [
""
],
"path": ""
}
}
For Windows: C:\Users\(user)\.vscode\extensions\lukasz-wronski.ftp-sync-0.3.9\modules\on-generate.js
For Linux: home/(user)/.vscode/extensions/lukasz-wronski.ftp-sync-0.3.9/modules/on-generate.js
module.exports = function(document, getFtpSync, skipOnSaveCheck) {
if (document.uri.fsPath.indexOf(ftpconfig.rootPath().fsPath) < 0) return;
var config = ftpconfig.getConfig();
if (!config.uploadOnSave) return;
// <------ ADD THIS LINE TO FIX
Great this broke my live site... Thx
After two and a half years still needed to use the workaround to not automatically sync files . I work directly with a local copy and production environment so auto-sync on save would be deadly. But the extension works great, thanks!
I am using VS Code 1.56.1 on Windows 10. I setup my ftp-sync.json as following. When I save files, they are not being uploaded. However, I can "Sync current file to remote", which works without any issue. Please help get uploadOnSave working. I already tried uninstalling and reinstalling ftp-sync, but it did not fix the problem.
{ "remotePath": "./htdocs", "host": "myhost", "username": "myuser", "password": "pswd", "port": 21, "secure": false, "protocol": "ftp", "uploadOnSave": true, "passive": false, "debug": false, "privateKeyPath": null, "passphrase": null, "agent": null, "allow": [], "ignore": [ "\.vscode", "\.git", "\.DS_Store" ], "generatedFiles": { "extensionsToInclude": [ "" ], "path": "" } }