NickRimmer / insomnia-plugin-free-sync

Insomnia plugin to save collections into a file
https://insomnia.rest/plugins/insomnia-plugin-free-sync
17 stars 3 forks source link

syncing to a directory unexpectedly clears the directory #24

Open mbaumgart opened 1 year ago

mbaumgart commented 1 year ago

Description of the issue

Because the sync directory is the default option, I selected a directory on my system to sync to, expecting Free Sync to just drop the generated files to sync into there, just like you specify home directories in other tools. Unfortunately for me I selected my projects directory for this. After hitting "Save workspace" I found that my whole projects directory was deleted and overwritten with Free Sync files.

Expected Result

I would have expected for Free Sync to not erase the directory contents and instead just create the self-managed files or directories there.

NickRimmer commented 1 year ago

Good point 👍 we can save resource folders in meta file, and clean them only

kolbeypruitt commented 1 year ago

This tool wiped every directory that I have an insomnia file in.. DO NOT RECOMMEND use until this is resolved.

kolbeypruitt commented 1 year ago

In fact it cleared data from all over my macbook's drive. I am going to have to restore it because apps are not functioning properly after seemingly random files were destroyed.

NickRimmer commented 1 year ago

I will find a time to fix it as fast as possible 😨

NickRimmer commented 1 year ago

As I understood, it will store everything in a subfolder which will not make the user safe from putting other files that will be removed on synchronization. So generally it will force a user to use a specific folder for insomnia settings instead of some project folder.

I see a couple of possible issues with it

I will try to play a bit with logic, to find some solution in a middle and let you back soon (=