lukasz-wronski / vscode-ftp-sync

Ftp Sync plugin for Visual Studio Code

Home Page:https://marketplace.visualstudio.com/items/lukasz-wronski.ftp-sync

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Review temp files hangs there after the fact

EthraZa opened this issue · comments

When we call to Review pending transfers, a file called sync-summary.json shows up on the editor and on the Working Files.
After we call Commit or close the file (since we don't have the Cancel operation here), the file just hangs there in the Working Files. At any time if we save this file it will be created in the root of the project.

I suggest to delete this file after Commit and to implement a Cancel to delete it before commit as well. Just to get rid with it and keep my Working Files clean. :)

Maybe I will check if someone try to save it. On save I will show message that this file should not be saved as it's just a temporary thing and won't save it at all? I don't like user to have to cancel the review implicitly.

It is a two parts problem.

1- Discard the file after Commit.
I guess this one is esier. You just need to remove the file on Commit.

2- What to do when we do not want to Commit anymore.
If I right click the json file and delete it, it will ask me if I'm sure and delete, problem resolved.
I just thought that have a Cancel operation to delete the file without confirmation (if possible), would be an alternative. But a not extremely necessary one, since we can already manually delete the file.
Another alternative could be a timeout to delete the file. If you don't commit, or request a new operation, after X seconds the file is gone.

The file is already discarded after commit, isn't it?
As for the option two - I do not like to add additional command just for that, timeout is not a good option too as someone might like to take it's time on reviewing the file.

I'd like to protect this file from being saved to disk, but right now I can't find suitable vs code api event to do it.

No the file does not get discarded after commit. It hangs there and I can redo the Commit how many times I want that it will perform the action.

This should now close file after a commit. Wait for 0.2.9 to check it.