SocialFlowDev / SocialFlow-S3

1 stars 0 forks source link

Don't overwrite files without -f/--force option #3

Closed ashb closed 11 years ago

ashb commented 11 years ago

Just for sanity sake I'd prefer it if it wouldn't overwrite existing files without a -f mode.

If it doesn't make sense for all applications I'd like a --no-overwrite that I could use for this script.

leonerd commented 11 years ago

I'm guessing you mean for get and put operations?

get is easy - can just stat() the local path. put is harder because it'd have to check if the remote file existed on S3 first.

leonerd commented 11 years ago

Oh also I notice we've already got -f for "config file". I wonder about turning that to

'C|config=s'

thus leaving -f for the more traditional --force meaning

ashb commented 11 years ago

Was thinking for remote operations, yeah (so put uncat etc.)

Changing to -C makes sense - for for it

leonerd commented 11 years ago

Implemented as of https://github.com/SocialFlowDev/SocialFlow-S3/commit/1a4e5064eb8c5c951297163b23b9833b5c0ed78b