vscode-sftp icon indicating copy to clipboard operation
vscode-sftp copied to clipboard

downloadOnOpen not downloading if you open a file you've edited, saved and then closed.

Open bizzclaw opened this issue 1 year ago • 0 comments

Describe the bug I'm using this tool to allow multiple users to modify a large set of files for a project - because of this our workflow has been to save a file and close it when we're not editing it, that way if someone else edits it, when they re-open the file it will be updated by someone elses changes. To better facilitate this, I enabled the downloadOnOpen option. This is really useful in theory, however in practice it seems that if a users makes any changes and saves a file, even after closing it, it does not call downloadOnOpen if they re-open a saved file until they restart VS Code.

To Reproduce Steps to reproduce the behavior:

  1. Open a file on two users conected to an FTP.
  2. Have one user make a save and then completely close the file by closing the tab
  3. Have the second user close the file and reopen it - it properly updates!
  4. The second user than makes a new change and closes the file.
  5. The first user will re-open the file and it will not have that change applied.
  6. The first user makes a second change.
  7. the second user now doesn't see the first users second change.
  8. They are now editing two divergent files, despite closing them when not working on them and reopening them with downloadOnOpen set to true.

Expected behavior re-opening the closed but saved file should trigger downloadOnOpen, causing the second user's changes to show up

Other notes If the first user completely closes VS Code and re-opens it, it will properly re-download the file, but this is really cumbersome for development on our shared project.

Desktop (please complete the following information):

  • OS: win
  • VSCode Version 1.94.0
  • Extension Version v1.16.3

Extension Logs from Startup sftp_output.txt

The logs show a "permission denied" for some sort of keepalive ping - I'm not sure if this is related because I see it pop up a lot and everything else about the plugin seems to work fine, but if this is a skill issue related to my sftp setup I'd appreciate some guidance because this is causing issues where people's work is being lost because someone will re-save a file that doesn't have someone elses edits in it. Thank you.

bizzclaw avatar Oct 08 '24 15:10 bizzclaw