mentrena / SyncKit

Automatic CloudKit synchronization
https://mentrena.github.io/SyncKit/
MIT License
506 stars 57 forks source link

QSTempFilemanager deletes other adapter's files #115

Closed BlixLT closed 4 years ago

BlixLT commented 4 years ago

I have just noticed that there is a problem with QSTempFilemanager logic: All adapters' tempFileManagers use the same folder for creating temporary files for their CKAssets during sync. Therefore when one finishes syncing, it clears that folder. But the files inside it might be still actually needed by some other adapter, that is still syncing. So, IMO each adapter's fileManager should have its own unique subfolder (or delete only files that it created).

mentrena commented 4 years ago

Well spotted and simple to fix, I've pushed an update to my open PR. I'll merge soon.