lukasz-wronski / vscode-ftp-sync

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

Cannot disable uploadOnSave. even when it's false !!! #277

Open rostamiani opened 5 years ago

rostamiani commented 5 years ago

I cannot disable uploadOnSave. The file always get uploaded after saving. This is the configuration:

{ "remotePath": "/public_html/charge/", "host": "ftp.clicktocall.net", "username": "profilet", "password": "7o4Yv4iVo2", "port": 21, "secure": false, "protocol": "ftp", "uploadOnSave": false, "passive": false, "debug": false, "privateKeyPath": null, "passphrase": null, "agent": null, "allow": [], "ignore": [ "\.vscode", "\.git", "\.DS_Store" ], "generatedFiles": { "extensionsToInclude": [ "" ], "path": "" } }

sbberni commented 5 years ago

I have the same problem. It seems to be a bug in the latest version. Try a previous version - it will work.

NajSurf commented 5 years ago

Download latest version from this github repository. It solves the issue.

frobinsonj commented 5 years ago

@NajSurf Any idea when this update will be pushed to vscode?

SijbenR commented 5 years ago

I'm using the latest version, downloaded from this GitHub repository, but I'm still not able to disable "uploadOnSave" when set to false. Anyone any suggestions?

SimbaRemiu commented 5 years ago

I have the same problem. :-(

elvirtu commented 5 years ago

Same problem here (2019-03-04), 'uploadOnSave' is always true for the extension. No matter what you choose. It's annoying because in some scenarios you DO NOT want the file to auto upload.

Edit: I add some info for the developers.

I use SFTP (secure: true, port 22) with RSA key to connect. Passive mode false.

hldjlz commented 5 years ago

I have the same problem,even if it's update to v0.4.0

EthraZa commented 5 years ago

Same here. The worst is that if you change the branch, it will start to upload all changed files, causing a freaking mess in the remote repository the FTP is pointing to. I had to modify the host so it stop FTPing without my consent.

Linux: Ubuntu 18.04 / Manjaro latest VScode: 1.33.0 ftp-sync: 0.3.9

ftp-sync.json:

{
    "remotePath": "/web/websys/dev",
    "host": "Xmyhost",
    "username": "myuser",
    "password": "mypass",
    "port": 21,
    "protocol": "ftp",
    "uploadOnSave": false,
    "passive": false,
    "debug": false,
    "privateKeyPath": null,
    "ignore": [
        "\\.git"
    ]
}
JordiTR commented 5 years ago

Same here. Probably it's a small thing but it is important to solve it.

haunt07 commented 3 years ago

I have the same problem. It seems to be a bug in the latest version. Try a previous version - it will work.

Yeah it works

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