Project

General

Profile

Actions

Bug #7821

closed

FileUtils.mkdir_p fails on Windows Unicode paths (\\?\UNC\) if dir already exists

Added by shyxormz (Patrick Pokatilo) over 8 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Normal
Target version:
ruby -v:
ruby 1.9.3p362 (2012-12-25) [i386-mingw32]
Backport:
[ruby-core:52097]

Description

Code:
FileUtils.mkdir_p "//?/C:/test"
FileUtils.mkdir_p "//?/C:/test"

What I expected:
Ruby will create directory C:\test on the first call and nothing on the second

What happened on the second call:
Errno::EACCESS: Permission denied - \?\C:
from C:/ruby/1.9.3-p362/lib/ruby/1.9.1/fileutils.rb:247:in mkdir'
from C:/ruby/1.9.3-p362/lib/ruby/1.9.1/fileutils.rb:247:in
fu_mkdir'
from C:/ruby/1.9.3-p362/lib/ruby/1.9.1/fileutils.rb:221:in block (2 levels) in mkdir_p'
from C:/ruby/1.9.3-p362/lib/ruby/1.9.1/fileutils.rb:219:in
reverse_each'
from C:/ruby/1.9.3-p362/lib/ruby/1.9.1/fileutils.rb:219:in block in mkdir_p'
from C:/ruby/1.9.3-p362/lib/ruby/1.9.1/fileutils.rb:205:in
each'
from C:/ruby/1.9.3-p362/lib/ruby/1.9.1/fileutils.rb:205:in mkdir_p'
from C:/ruby/1.9.3-p362/lib/ruby/1.9.1/fileutils.rb:247:in
mkdir'
from C:/ruby/1.9.3-p362/lib/ruby/1.9.1/fileutils.rb:247:in `mkdir'


Related issues

Related to Ruby master - Bug #7822: Dir.mkdir can't handle long Windows Unicode paths (\\?\UNC\)Rejectedusa (Usaku NAKAMURA)02/10/2013Actions
Actions

Also available in: Atom PDF