rumblelabs/asset_sync — Issue #19: Calculation of local_files_to_upload is incorrect
Author: jasonhutchens
Created: 2011-11-09 04:48:51+00:00
State: open

In `AssetSync::Storage::upload_files`, the list of files to upload is calculates as follows:

```
local_files_to_upload = (remote_files | local_files) - (remote_files & local_files)
```

This means that `asset_sync` will attempt to upload files that are present in `remote_files` but which are not present in `local_files`. This will break if, for example, the `assets` directory is cleaned, but old versions of assets are being kept on S3. Perhaps this should be changed to:

```
local_files_to_upload = local_files - remote_files
```