Frontify / sketch

Frontify Sketch Plugin
Other
7 stars 1 forks source link

Bug/clearing export folder #11

Closed thisguyscode closed 4 years ago

thisguyscode commented 4 years ago

First two commits are just prettier related so check out f1414ea for clarity of what I changed.

For some reason (beyond my understanding) Sketch reinstantiates (correct word?) the filemanager sometimes (e.g. when handling selectionChanged event) - which causes filemanager to run clearExportFolder(), regardless of whether uploadFile() has been run on those exports yet.

Fix seems to be to remove this from filemanager and delete only the relevant files when the uploadFile() promise is resolved. Two particular deleteFile() calls were commented out by @brunschgi so I'd particularly like him to double check this solution.

thisguyscode commented 4 years ago

@brunschgi - that whole thing is on hold because it would take significant dev resources to help get it to production quality. Sure we could think of a different solution for clearing the exports folder if it came to it though.