liximomo / vscode-sftp

Super fast sftp/ftp extension for VS Code
MIT License
1.5k stars 259 forks source link

File watcher uploads whole folder #827

Open ghost opened 3 years ago

ghost commented 3 years ago

Describe the bug When we rename or create a new file or delete a file in directory, whole directory is being synced.

Watcher config:

"watcher": {
        "files": "**/*",
        "autoUpload": true,
        "autoDelete": true
},

To fix this issue we can limit files to **/*.* but we lose ability to watch files without extension.

To Reproduce Steps to reproduce the behavior:

  1. Create a folder
  2. Create some files on that folder
  3. Rename a file in that folder

Expected behavior Delete old file, rename local file, upload local file to remote

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information): MacOS Windows 10 Extension version: liximomo.sftp-1.12.9

Extension Logs from Startup - required

[09-13 22:52:13] [info] [watcher/updated] c:\Users\Amirhossein\Projects\panel\include\config\consoles
[09-13 22:52:13] [warn] ENOENT: no such file or directory, open 'C:\Users\Amirhossein\.ssh\config' load C:\Users\Amirhossein\.ssh\config failed
[09-13 22:52:13] [trace] handle upload for c:\Users\Amirhossein\Projects\panel\include\config\consoles
[09-13 22:52:13] [debug] Local ident: 'SSH-2.0-ssh2js0.4.5'
[09-13 22:52:13] [debug] Client: Trying 1.1.1.1 on port 5000 ...
[09-13 22:52:13] [info] [watcher/removed] c:\Users\Amirhossein\Projects\panel\include\config\console
[09-13 22:52:13] [trace] handle removeRemote for c:\Users\Amirhossein\Projects\panel\include\config\console
[09-13 22:52:13] [debug] Client: Connected
[09-13 22:52:13] [debug] Remote ident: 'SSH-2.0-OpenSSH_7.4'
[09-13 22:52:14] [debug] Outgoing: Writing KEXINIT
[09-13 22:52:14] [info] [watcher/updated] c:\Users\Amirhossein\Projects\panel\include\config
[09-13 22:52:14] [trace] handle upload for c:\Users\Amirhossein\Projects\panel\include\config
marcusdiy commented 3 years ago

Yes, very annoying, time consuming and bandwidth hungry. Would like to see it fixed too. I have an media folder with over 12.000 images + videos, and adding one file just trigger an full sync 🤯 So i have to edit the sftp file to disable watcher, add the file, manually sync, re-enable watcher Seems like the implementation of the watcher is just cheap...