Natizyskunk / vscode-sftp

Super fast sftp/ftp extension for VS Code
Other
373 stars 68 forks source link

Ignore setting does not prevent deletion of specific folder on server #489

Open LigarbaCom opened 1 month ago

LigarbaCom commented 1 month ago

I'm experiencing an issue with the SFTP extension (v1.16.3) for Visual Studio Code where the ignore settings do not prevent the deletion of a specific folder on the server.

  1. Configure the sftp.json file with the following settings:

{ "name": "mysite", "host": "mysite.com", "protocol": "ftp", "secure": true, "secureOptions": { "rejectUnauthorized": false }, "port": 21, "watcher": { "files": "**/*", "autoUpload": true, "autoDelete": true }, "username": "username", "password": "password", "remotePath": "/", "uploadOnSave": true, "ignore": [".vscode", ".git","db/", ".DS_Store","node_modules/", "client/", ".gitignore", ".env",".env.sample","img/"] }

  1. In the local project, delete some files and folders, including those in the public directory but NOT in the public/img folder.

  2. Upon saving, the public/img folder and its contents are also deleted on the server, despite being included in the ignore settings.

Expected Behavior: The public/img folder and its contents should remain intact on the server, even if they are deleted locally.

Actual Behavior: The public/img folder and its contents are deleted on the server when deleted locally, despite being listed in the ignore settings.

Environment:

VS Code version: 1.89.1
SFTP extension version: 1.16.3
OS: [MacOS]

Additional Context: It is crucial for my workflow to keep the public/img folder intact on the server, while other files and folders can be deleted. Any guidance on how to properly configure the ignore settings to achieve this would be greatly appreciated.