lukasz-wronski / vscode-ftp-sync

Ftp Sync plugin for Visual Studio Code
https://marketplace.visualstudio.com/items/lukasz-wronski.ftp-sync
320 stars 89 forks source link

Upload on save happening always on Windows #320

Open vimalpansuriya1698 opened 3 years ago

vimalpansuriya1698 commented 3 years ago

{ "remotePath": "/path", "host": "host", "username": "un", "password": "pwd", "port": 22, "secure": false, "protocol": "sftp", "uploadOnSave": false, "passive": false, "debug": false, "privateKeyPath": null, "passphrase": null, "agent": null, "allow": [], "ignore": [ ".vscode", ".git", ".DS_Store" ], "generatedFiles": { "uploadOnSave": false, "extensionsToInclude": [], "path": "" } }

websasindu commented 3 years ago

Same here. uploadOnSave: false but automatic upload to server when i did save the file.

facundodartayete commented 3 years ago

same issue. it only happens when using sftp protocol, it works fine with ftp

dudagervasio commented 3 years ago

Same issue here! Always upload the file when save, but uploadOnSave=false!

OS: Windows 10! .... "port": 21, "secure": false, "protocol": "ftp", "uploadOnSave": false, .... I didn´t try sftp...

dudagervasio commented 3 years ago

This work for me: 1) Rename (or delete) the on-save.js file in modules folder (C:\Users[your_username].vscode\extensions\lukasz-wronski.ftp-sync-0.3.9\modules) 2) Restart VSCode

I have tried to make some changes on it, but even with a blank return it uploads the file... the issue maybe is in another script! But the rename solved the question...

dtamajon commented 3 years ago

This is happening for me also with FTP. If I restart VSCode it starts to work properly, but after some time it fails again. A merge operation or change of branch are some actions that makes it fail.

Vinze commented 3 years ago

I am experiencing the same problems.. Is this project still maintained or should I look for another FTP plugin?

murad-faridi commented 2 years ago

Edit the following file to FIX:-

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

File will look like this:

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