This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rbarran
Recipients
Date 2005-12-02.16:07:57
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=1207189

Hi,
Your patch "makedirs.py" for python 2.5 will fail under
Windows if a drive letter is specified:

>>> os.getcwd()
'C:\\Temp\\makedirs'
>>> os.listdir('.')
['makedirs.py', 'makedirs.pyc', 'test.py']
>>> makedirs.makedirs('c:/temp/makedirs/a/b')
>>> os.listdir('.')
['makedirs.py', 'makedirs.pyc', 'temp', 'test.py']

It will create the following path:
C:\Temp\makedirs\temp\makedirs\a\b

Also I ran it through the test suite (lib\test\test_os.py)
and it failed one test:

======================================================================
FAIL: test_makedir (__main__.MakedirTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_os.py", line 327, in test_makedir
    self.failUnlessRaises(OSError, os.makedirs, os.curdir)
AssertionError: OSError not raised

----------------------------------------------------------------------

I haven't looked into *why* this happens - I'll dig a bit
deeper into this subject sometime next week.

HTH,
Richard
History
Date User Action Args
2007-08-23 15:43:32adminlinkissue1239890 messages
2007-08-23 15:43:32admincreate