From: <lu...@us...> - 2009-12-09 11:11:18
|
Revision: 401 http://s3tools.svn.sourceforge.net/s3tools/?rev=401&view=rev Author: ludvigm Date: 2009-12-09 11:11:08 +0000 (Wed, 09 Dec 2009) Log Message: ----------- * s3cmd: Path separator conversion on Windows hosts. Modified Paths: -------------- s3cmd/trunk/ChangeLog s3cmd/trunk/s3cmd Modified: s3cmd/trunk/ChangeLog =================================================================== --- s3cmd/trunk/ChangeLog 2009-10-08 01:14:42 UTC (rev 400) +++ s3cmd/trunk/ChangeLog 2009-12-09 11:11:08 UTC (rev 401) @@ -1,3 +1,7 @@ +2009-12-10 Michal Ludvig <ml...@lo...> + + * s3cmd: Path separator conversion on Windows hosts. + 2009-10-08 Michal Ludvig <ml...@lo...> * Released version 0.9.9.91 Modified: s3cmd/trunk/s3cmd =================================================================== --- s3cmd/trunk/s3cmd 2009-10-08 01:14:42 UTC (rev 400) +++ s3cmd/trunk/s3cmd 2009-12-09 11:11:08 UTC (rev 401) @@ -639,6 +639,9 @@ ## for now skip over continue relative_file = unicodise(os.path.join(rel_root, f)) + if os.path.sep != "/": + # Convert non-unix dir separators to '/' + relative_file = "/".join(relative_file.split(os.path.sep)) if cfg.urlencoding_mode == "normal": relative_file = replace_nonprintables(relative_file) if relative_file.startswith('./'): @@ -738,6 +741,10 @@ cfg = Config() exists_list = SortedDict(ignore_case = False) + debug("Comparing filelists (src_is_local_and_dst_is_remote=%s)" % src_is_local_and_dst_is_remote) + debug("src_list.keys: %s" % src_list.keys()) + debug("dst_list.keys: %s" % dst_list.keys()) + for file in src_list.keys(): debug(u"CHECK: %s" % file) if dst_list.has_key(file): @@ -817,7 +824,10 @@ if destination_base[-1] != os.path.sep: destination_base += os.path.sep for key in remote_list: - remote_list[key]['local_filename'] = deunicodise(destination_base + key) + local_filename = destination_base + key + if os.path.sep != "/": + local_filename = os.path.sep.join(local_filename.split("/")) + remote_list[key]['local_filename'] = deunicodise(local_filename) if cfg.dry_run: for key in exclude_list: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |