Index: _test_real_ftp.py =================================================================== --- _test_real_ftp.py (revision 717) +++ _test_real_ftp.py (working copy) @@ -173,6 +173,15 @@ host.chdir(host.pardir) host.rmdir('/_dir1_') + def test_makedirs_from_non_root_directory_fake_windows_os(self): + saved_sep = os.sep + os.sep = '\\' + try: + self.test_makedirs_from_non_root_directory() + except: + os.sep = saved_sep + raise + def test_makedirs_of_existing_directory(self): host = self.host # the (chrooted) login directory Index: ftputil.py =================================================================== --- ftputil.py (revision 717) +++ ftputil.py (working copy) @@ -609,7 +609,7 @@ # the "lowermost" directory for index in range(1, len(directories)): # re-insert the separator which got lost by using `path.split` - next_directory = os.sep + self.path.join(*directories[:index+1]) + next_directory = self.sep + self.path.join(*directories[:index+1]) try: self.mkdir(next_directory) except ftp_error.PermanentError: