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

Files uploaded when uploadOnSave is set to false #327

Open StephenBugden opened 3 years ago

StephenBugden commented 3 years ago

Hello,

I have uploadOnSave set to false but files are still uploaded to my server on save.

Is there any way to fix this?

I would like to work on new features or bug fixes then up load them to the server once tested. I'm unable to work like that as things stand.

I can see there were issues with this in the past but that was some time ago, the reason for submitting a new issue.

Best Regards,

Steve

StephenBugden commented 3 years ago

Possible solution: https://github.com/lukasz-wronski/vscode-ftp-sync/issues/307

murad-faridi commented 3 years ago

Edit the following file to FIX:-

For Windows: C:\Users\.vscode\extensions\lukasz-wronski.ftp-sync-0.3.9\modules\on-generate.js For Linux: Home/.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
MightyGorgon commented 3 years ago

This bug is very annoying and I think it deserves an official fix and extension updates.

I almost compromised a website because of this.