Changeset 719

Show
Ignore:
Timestamp:
2008-07-30 18:51:51 (4 months ago)
Author:
schwa
Message:
Fixed bug reported by Richard Holden, see
http://codespeak.net/pipermail/ftputil/2008q3/000236.html .
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/_test_real_ftp.py

    r718 r719  
    5959    Return the expected time shift in seconds assuming the server 
    6060    uses UTC in its listings and the client uses local time. 
    61      
     61 
    6262    This is needed because Pure-FTPd meanwhile seems to insist that 
    6363    the displayed time for files is in UTC. 
     
    7676#  and client use the same timezone 
    7777EXPECTED_TIME_SHIFT = utc_local_time_shift() 
     78 
    7879 
    7980class RealFTPTest(unittest.TestCase): 
     
    159160        host.rmdir('_dir1_') 
    160161 
    161     def test_makedirs_from_not_root_directory(self): 
     162    def test_makedirs_from_non_root_directory(self): 
    162163        # this is a testcase for issue #22, see 
    163164        #  http://ftputil.sschwarzer.net/trac/ticket/22 
     
    190191        host.chdir(host.pardir) 
    191192        host.rmdir('/_dir1_') 
     193 
     194    def test_makedirs_from_non_root_directory_fake_windows_os(self): 
     195        saved_sep = os.sep 
     196        os.sep = '\\' 
     197        try: 
     198            self.test_makedirs_from_non_root_directory() 
     199        finally: 
     200            os.sep = saved_sep 
    192201 
    193202    def test_makedirs_of_existing_directory(self): 
  • trunk/ftputil.py

    r713 r719  
    610610        for index in range(1, len(directories)): 
    611611            # re-insert the separator which got lost by using `path.split` 
    612             next_directory = os.sep + self.path.join(*directories[:index+1]) 
     612            next_directory = self.sep + self.path.join(*directories[:index+1]) 
    613613            try: 
    614614                self.mkdir(next_directory)