Skip to content

Prevent accidental upload #350

@borekb

Description

@borekb

Issuehunt badges

I have two computers with VSCode installed that I keep synchronized using this awesome extension. I have both autoUpload and autoDownload disabled (personal preference) so have to remember to upload / download manually.

If I'm not mistaken, download is safe: if I'm on a computer with newer settings (local only, not uploaded yet) and I invoke download, it will not overwrite my settings because sync.lastDownload equals what's in the Gist's cloudSettings lastUpload and silently finish (probably, I'm not 100% sure, there's a strict match instead of >=).

However, upload is not safe. Let's say both my machines are currently synchronized and I update settings on the first machine and upload. Now I come to the second machine and forget that I have to download first and I run upload straight away. This will upload my older settings from PC no. 2, losing changes done by PC no. 1 (well, I can get back the older settings from Gist but something bit troublesome just happened).

I'd propose making upload safe as well. For example, the extension could detect that my local settings are older than those on Gist (my local lastDownload is older than Gist's lastUpload) and warn me.

Also, if this is going to be implemented, I'd like to avoid repetitive uploads. Now, if I invoke upload 5 times, even though no settings actually changed, I will get 5 new revisions of the Gist. This is unnecessary, IMO.


IssueHunt Summary

shanalikhan shanalikhan has been rewarded.

Backers (Total: $50.00)

Submitted pull Requests


Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions