Browse code

* s3cmd: Refuse 'sync' together with '--encrypt'.

git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/trunk@221 830e0280-6d2a-0410-9c65-932aecc39d9d

Michal Ludvig authored on 2008/09/01 12:02:33
Showing 2 changed files
... ...
@@ -1,5 +1,6 @@
1 1
 2008-09-01  Michal Ludvig  <michal@logix.cz>
2 2
 
3
+	* s3cmd: Refuse 'sync' together with '--encrypt'.
3 4
 	* S3/S3.py: removed object_{get,put,delete}_uri() functions
4 5
 	  and made object_{get,put,delete}() accept URI instead of 
5 6
 	  bucket/object parameters.
... ...
@@ -555,7 +555,14 @@ def cmd_sync_local2remote(src, dst):
555 555
 		for k in attrs: result += "%s:%s/" % (k, attrs[k])
556 556
 		return { 'x-amz-meta-s3cmd-attrs' : result[:-1] }
557 557
 
558
-	s3 = S3(Config())
558
+	s3 = S3(cfg)
559
+
560
+	if cfg.encrypt:
561
+		error("S3cmd 'sync' doesn't support GPG encryption, sorry.")
562
+		error("Either use unconditional 's3cmd put --recursive'")
563
+		error("or disable encryption with --no-encryption parameter.")
564
+		sys.exit(1)
565
+
559 566
 
560 567
 	src_uri = S3Uri(src)
561 568
 	dst_uri = S3Uri(dst)