s3tools/s3cmd — pull request #96 by zatchery (2012-12-20 21:21:55+00:00)
Title: Trouble with Windows file paths

I recently had trouble with downloading a WindowsImageBackup file to my Windows Server 2008 machine. After taking it to the debugger I found that python assumed makedirs on line 423 in s3cmd is being passed a valid file path (basename) which is constructed on line 386. The problem is that in windows \\ is the path separator (os.path.sep) vs. the / in everything else. I fixed this by using the str.replace("a", "b") function to switch the / with the os.path.sep on line 386 which gets the correct path separator from the OS.