Project

General

Profile

Bug #11874

File.realpath fail on volume mount point directory

Added by personnel (Am I Who) almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 2.3.0p0 (2015-12-25 revision 53290) [x64-mingw32]
[ruby-core:72483]

Description

'C:\AAA' is a volume mount point.

When run "File.realpath 'C:\AAA'" it reports:
-e:1:in realpath': No such file or directory @ realpath_rec - C:/Volume{b0513fa8-eb82-4aa7-92f4-bafb0d0d9220} (Errno::ENOENT)
from -e:1:in
'

ruby 2.3.0 adds HAVE_READLINK for windows then the bug appears

Associated revisions

Revision 47f6196c
Added by usa (Usaku NAKAMURA) almost 4 years ago

  • win32/win32.c (fileattr_to_unixmode, rb_w32_reparse_symlink_p): volume
    mount point should be treated as directory, not symlink.
    [ruby-core:72483] [Bug #11874]

  • win32/win32.c (rb_w32_read_reparse_point): check the reparse point is
    a volume mount point or not.

  • win32/file.c (rb_readlink): follow above change (but this pass won't
    be used).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 53688
Added by usa (Usaku NAKAMURA) almost 4 years ago

  • win32/win32.c (fileattr_to_unixmode, rb_w32_reparse_symlink_p): volume
    mount point should be treated as directory, not symlink.
    [ruby-core:72483] [Bug #11874]

  • win32/win32.c (rb_w32_read_reparse_point): check the reparse point is
    a volume mount point or not.

  • win32/file.c (rb_readlink): follow above change (but this pass won't
    be used).

Revision 53688
Added by usa (Usaku NAKAMURA) almost 4 years ago

  • win32/win32.c (fileattr_to_unixmode, rb_w32_reparse_symlink_p): volume
    mount point should be treated as directory, not symlink.
    [ruby-core:72483] [Bug #11874]

  • win32/win32.c (rb_w32_read_reparse_point): check the reparse point is
    a volume mount point or not.

  • win32/file.c (rb_readlink): follow above change (but this pass won't
    be used).

Revision 53688
Added by usa (Usaku NAKAMURA) almost 4 years ago

  • win32/win32.c (fileattr_to_unixmode, rb_w32_reparse_symlink_p): volume
    mount point should be treated as directory, not symlink.
    [ruby-core:72483] [Bug #11874]

  • win32/win32.c (rb_w32_read_reparse_point): check the reparse point is
    a volume mount point or not.

  • win32/file.c (rb_readlink): follow above change (but this pass won't
    be used).

Revision 53688
Added by usa (Usaku NAKAMURA) almost 4 years ago

  • win32/win32.c (fileattr_to_unixmode, rb_w32_reparse_symlink_p): volume
    mount point should be treated as directory, not symlink.
    [ruby-core:72483] [Bug #11874]

  • win32/win32.c (rb_w32_read_reparse_point): check the reparse point is
    a volume mount point or not.

  • win32/file.c (rb_readlink): follow above change (but this pass won't
    be used).

Revision 710fe14b
Added by naruse (Yui NARUSE) over 3 years ago

merge revision(s) 53688,53689,53690,53702: [Backport #11874]

    * win32/win32.c (fileattr_to_unixmode, rb_w32_reparse_symlink_p): volume
      mount point should be treated as directory, not symlink.
      [ruby-core:72483] [Bug #11874]

    * win32/win32.c (rb_w32_read_reparse_point): check the reparse point is
      a volume mount point or not.

    * win32/file.c (rb_readlink): follow above change (but this pass won't
      be used).

    * win32/file.c (rb_readlink): drop garbage after the substitute
      name, as rb_w32_read_reparse_point returns the expected buffer
      size but "\??\" prefix is dropped from the result.

    * win32/win32.c (w32_readlink): ditto, including NUL-terminator.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 54424
Added by naruse (Yui NARUSE) over 3 years ago

merge revision(s) 53688,53689,53690,53702: [Backport #11874]

* win32/win32.c (fileattr_to_unixmode, rb_w32_reparse_symlink_p): volume
  mount point should be treated as directory, not symlink.
  [ruby-core:72483] [Bug #11874]

* win32/win32.c (rb_w32_read_reparse_point): check the reparse point is
  a volume mount point or not.

* win32/file.c (rb_readlink): follow above change (but this pass won't
  be used).

* win32/file.c (rb_readlink): drop garbage after the substitute
  name, as rb_w32_read_reparse_point returns the expected buffer
  size but "\??\" prefix is dropped from the result.

* win32/win32.c (w32_readlink): ditto, including NUL-terminator.

History

Updated by personnel (Am I Who) almost 4 years ago

  • Description updated (diff)

Updated by personnel (Am I Who) almost 4 years ago

  • Subject changed from ruby 2.3.0 fail to run when install under volume mount point directory to File.realpath fail on volume mount point directory
  • Description updated (diff)

Updated by personnel (Am I Who) almost 4 years ago

  • Assignee deleted (nobu (Nobuyoshi Nakada))

Updated by personnel (Am I Who) almost 4 years ago

  • Assignee set to nobu (Nobuyoshi Nakada)
#5

Updated by usa (Usaku NAKAMURA) almost 4 years ago

  • Status changed from Open to Closed

Applied in changeset r53688.


  • win32/win32.c (fileattr_to_unixmode, rb_w32_reparse_symlink_p): volume
    mount point should be treated as directory, not symlink.
    [ruby-core:72483] [Bug #11874]

  • win32/win32.c (rb_w32_read_reparse_point): check the reparse point is
    a volume mount point or not.

  • win32/file.c (rb_readlink): follow above change (but this pass won't
    be used).

Updated by usa (Usaku NAKAMURA) over 3 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONTNEED

Updated by usa (Usaku NAKAMURA) over 3 years ago

  • Backport changed from 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONTNEED to 2.1: DONTNEED, 2.2: DONTNEED, 2.3: REQUIRED

Updated by naruse (Yui NARUSE) over 3 years ago

  • Backport changed from 2.1: DONTNEED, 2.2: DONTNEED, 2.3: REQUIRED to 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONE

ruby_2_3 r54424 merged revision(s) 53688,53689,53690,53702.

Also available in: Atom PDF