Skip to content

Commit

Permalink
Adding ability to specify location of encrypted temp files
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Erickson committed Nov 9, 2011
1 parent 649e813 commit 364895a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions S3/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class Config(object):
proxy_host = ""
proxy_port = 3128
encrypt = False
temp_location = "/tmp/tmpfile-"
dry_run = False
preserve_attrs = True
preserve_attrs_list = [
Expand Down
3 changes: 2 additions & 1 deletion s3cmd
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ def gpg_command(command, passphrase = ""):
return p_exitcode

def gpg_encrypt(filename):
tmp_filename = Utils.mktmpfile()
tmp_filename = Utils.mktmpfile( cfg.temp_location )
args = {
"gpg_command" : cfg.gpg_command,
"passphrase_fd" : "0",
Expand Down Expand Up @@ -1486,6 +1486,7 @@ def main():

optparser.add_option("-e", "--encrypt", dest="encrypt", action="store_true", help="Encrypt files before uploading to S3.")
optparser.add_option( "--no-encrypt", dest="encrypt", action="store_false", help="Don't encrypt files.")
optparser.add_option( "--temp-location", dest="temp_location", metavar="FOLDER", help="Location to store temporary files for encrypt. Add trailing / to signify directory and leave off to signify file prefix. Defaults to /tmp/tmpfile-")
optparser.add_option("-f", "--force", dest="force", action="store_true", help="Force overwrite and other dangerous operations.")
optparser.add_option( "--continue", dest="get_continue", action="store_true", help="Continue getting a partially downloaded file (only for [get] command).")
optparser.add_option( "--skip-existing", dest="skip_existing", action="store_true", help="Skip over files that exist at the destination (only for [get] and [sync] commands).")
Expand Down

0 comments on commit 364895a

Please sign in to comment.