dizda / CloudBackupBundle

Be able to backup your database(s) and upload it to the cloud (Dropbox, Amazon S3, GoogleDrive, etc.)
MIT License
196 stars 57 forks source link

Fix bug when using multiple gaufrette filesystems #74

Closed lemonlab closed 8 years ago

lemonlab commented 8 years ago

This is related to this previous PR : https://github.com/dizda/CloudBackupBundle/pull/72 I did a mistake.

Multiple filesystems was still not working : all filesystems except the last one was ignored.

This is because we were doing a setFilesystem on every filesystems. So the last one was overriding all others.

Instead we can consider 2 approach : 1 - Using multiple GaufretteClient (one per filesystem), and add them all to the ClientManager as $children. 2 - Using 1 GaufretteClient to handle all the filesystems, and keep just one GaufretteClient attached to the ClientManager

I think the second option is better. What do you think ? This PR implement the second option.

Also, not sure if pluralize the property $filesystem of the class GaufretteClient is a best practice ? https://github.com/FrancoisMartin/CloudBackupBundle/blob/master/Client/GaufretteClient.php#l15

dizda commented 8 years ago

Yeah that's make sense, I merge it.

Thanks :)