Browse code

* s3cmd: Read config file even if User Profile directory on Windows contains non-ascii symbols. Thx Slava Vishnyakov

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

Michal Ludvig authored on 2010/10/25 17:03:27
Showing 2 changed files
... ...
@@ -2,6 +2,8 @@
2 2
 
3 3
 	* s3cmd: Improved 'fixbucket' command. Thanks to Srinivasa
4 4
 	  Moorthy.
5
+	* s3cmd: Read config file even if User Profile directory on 
6
+	  Windows contains non-ascii symbols. Thx Slava Vishnyakov
5 7
 
6 8
 2010-10-25  Michal Ludvig  <mludvig@logix.net.nz>
7 9
 
... ...
@@ -1600,7 +1600,7 @@ def main():
1600 1600
 	if os.getenv("HOME"):
1601 1601
 		config_file = os.path.join(os.getenv("HOME"), ".s3cfg")
1602 1602
 	elif os.name == "nt" and os.getenv("USERPROFILE"):
1603
-		config_file = os.path.join(os.getenv("USERPROFILE"), "Application Data", "s3cmd.ini")
1603
+		config_file = os.path.join(os.getenv("USERPROFILE").decode('mbcs'), "Application Data", "s3cmd.ini")
1604 1604
 
1605 1605
 	preferred_encoding = locale.getpreferredencoding() or "UTF-8"
1606 1606