Issue #7822 has been updated by Usaku NAKAMURA.


(1) Windows has the limitation about the length of each directory name.
    It's 255 characters.
    So, even if with using UNC name, you cannot make such directory, Patrick.

(2) Yes, you are right, Eric.
    Only when using "\\\\?\\", Windows does not recognize "/" as the separator
    (the document which Patrick mentioned says so.)
    So, use "\\" as the separator when using "\\\\?\\" for the time being.

----------------------------------------
Bug #7822: Dir.mkdir can't handle long Windows Unicode paths (\\?\UNC\)
https://bugs.ruby-lang.org/issues/7822#change-46225

* Author: Patrick Pokatilo
* Status: Assigned
* Priority: Normal
* Assignee: Usaku NAKAMURA
* Category: 
* Target version: 
* ruby -v: ruby 1.9.3p362 (2012-12-25) [i386-mingw32]
* Backport: 
----------------------------------------
Code:
  Dir.mkdir "//?/C:/" + "test" * 100

What I expected:
  Ruby will create directory //?/C:/testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest, judging from http://msdn.microsoft.com/en-us/library/aa365247.aspx

What happened on the second call:
  Errno::ENOENT: No such file or directory - //?/C:/testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest
          from (irb):6:in `mkdir'



-- 
https://bugs.ruby-lang.org/