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

"uploadOnSave" doesn't work - FIXED #307

Open dschiller opened 4 years ago

dschiller commented 4 years ago

If "uploadOnSave": false it still uploads on Saving. How to fix that ?

dschiller commented 4 years ago

If somebody knows how to implement it, here is the Fix:

on-generate.js ( C:\Users\<User>\.vscode\extensions\lukasz-wronski.ftp-sync-0.3.9\modules )

module.exports = function(document, getFtpSync, skipOnSaveCheck) {
  if (document.uri.fsPath.indexOf(ftpconfig.rootPath().fsPath) < 0) return;

  var config = ftpconfig.getConfig();

  if (!config.uploadOnSave && !skipOnSaveCheck) return; // <------ THE FIX
StephenBugden commented 3 years ago

Hi,

I have the same problem, can't stop files uploading on save.

I tried adding the suggested line to on-generate.js but it didn't work for me. Tried restarting vs code too,

Is there something else I need to do?

Steve

dschiller commented 3 years ago

Try this one:

if (!config.uploadOnSave) return;
StephenBugden commented 3 years ago

Hi Dirk,

That works, thank you so much!

Steve

dschiller commented 3 years ago

You are welcome Steve.

NiklasVoigt commented 9 months ago

Try this one:

if (!config.uploadOnSave) return;

Works!