Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding ability to specify location of encrypted temp files

  • Loading branch information...
commit 364895a3723b5b1f1bd35c8d716811a090faed9b 1 parent 649e813
@firstclown authored
Showing with 3 additions and 1 deletion.
  1. +1 −0  S3/Config.py
  2. +2 −1  s3cmd
View
1  S3/Config.py
@@ -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 = [
View
3  s3cmd
@@ -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",
@@ -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).")
Please sign in to comment.
Something went wrong with that request. Please try again.