[Python-bugs-list] [ python-Bugs-465447 ] os.makedirs can fail with UNC paths

noreply@sourceforge.net noreply@sourceforge.net
Wed, 26 Sep 2001 20:07:18 -0700


Bugs item #465447, was opened at 2001-09-26 17:13
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=465447&group_id=5470

>Category: Documentation
Group: Platform-specific
Status: Open
Resolution: None
Priority: 5
Submitted By: Andrew Bennetts (spiv)
>Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: os.makedirs can fail with UNC paths

Initial Comment:
Calling 
  os.makedirs('//remote/path/that/does/not/exist/yet')

can cause an "OSError: [Errno 22] Invalid 
argument: '//remote'"

If I map an equivalent network drive, it works fine 
(e.g. os.makedirs('N:/that/does/not/exist/yet'))


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

>Comment By: Tim Peters (tim_one)
Date: 2001-09-26 20:07

Message:
Logged In: YES 
user_id=31435

It's hard to know whether to call this a doc bug or a 
feature request -- it's something of both.  Calling it a 
doc bug for now and reassigning to Fred.

Lots of things don't work with UNC paths, starting with 
ntpath.split() (the immediate cause of the failure reported 
here).  The only functions we have that understand UNC 
paths are path.splitunc(), and the only one that calls it, 
path.ismount() (which isn't called by anything else).

Until someone contributes code and test cases to make 
everything else UNC-aware, we should document that sundry 
os. and os.path functions don't work with UNC paths 
correctly.

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

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=465447&group_id=5470