Project

General

Profile

Actions

Bug #7821

closed

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

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

Added by shyxormz (Patrick Pokatilo) over 12 years ago. Updated over 11 years ago.

Status:
Rejected
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 1 (0 open1 closed)

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

Updated by usa (Usaku NAKAMURA) over 12 years ago Actions #1 [ruby-core:52194]

  • Status changed from Open to Assigned
  • Assignee set to usa (Usaku NAKAMURA)
  • Target version set to 2.0.0

Updated by mame (Yusuke Endoh) over 12 years ago Actions #2 [ruby-core:52482]

Usa-san, how significant is this issue?

--
Yusuke Endoh

Updated by mame (Yusuke Endoh) over 12 years ago Actions #3 [ruby-core:52571]

  • Target version changed from 2.0.0 to 2.6

Looks not so critical.

--
Yusuke Endoh

Updated by elovelan (Eric Loveland) over 11 years ago Actions #4 [ruby-core:62054]

This is actually due to a bug in File.directory?

File.directory?("\\\\?\\C:")

returns false. New bug for this?

Updated by usa (Usaku NAKAMURA) over 11 years ago Actions #5 [ruby-core:62055]

The path with "\?" must be fullpath.
It's the spec of Windows.

Updated by usa (Usaku NAKAMURA) over 11 years ago Actions #6 [ruby-core:62057]

  • Related to Bug #7822: Dir.mkdir can't handle long Windows Unicode paths (\\?\UNC\) added

Updated by usa (Usaku NAKAMURA) over 11 years ago Actions #7 [ruby-core:62059]

  • Status changed from Assigned to Rejected

See #7822.

Actions

Also available in: PDF Atom