# Issue2120

classification
Title: Type: os.mkdir fails on UNC network paths behaviour major Library Jython 2.7
process
Status: Resolution: open jeff.allen, santa4nt, saynt

Created on 2014-03-27.19:32:56 by saynt, last changed 2014-04-24.22:02:22 by jeff.allen.

Messages
msg8264 (view) Author: Rob Jones (saynt) Date: 2014-03-27.19:41:31
os.mkdir() fails with Errno 3 [No such process] when trying to execute on a UNC path of the form r'\\server\share\path\to\dir\to\create'.  This works when the share is mounted to a drive letter and created using a path of the form r'X:\path\to\dir\to\create'.  This may be loosely related to issue #2014.
msg8307 (view) Author: Jeff Allen (jeff.allen) Date: 2014-04-24.22:02:22
I've had a look at this (at first to see if I caused it) and I can see it go wrong. I think maybe the fault is with jnr.posix. A path like "\\MYHOST\Users\Public\test" (to be created) gets as far as this line:
https://github.com/jnr/jnr-posix/blob/master/src/main/java/jnr/posix/util/WindowsHelpers.java#L27
where "//?/" is stuck on the front. I think that would be right for a drive-based path like "C:\Users\Public\test" but here we should be writing "//?/UNC\MYHOST\Users\Public\test".

If I force it to have that value (in the debugger) I find the directory is created.
History
Date User Action Args
2014-04-24 22:02:22jeff.allensetnosy: + jeff.allen
messages: + msg8307
2014-04-01 23:36:04santa4ntsetnosy: + santa4nt
2014-03-27 19:41:31sayntsetmessages: + msg8264
2014-03-27 19:32:56sayntcreate