Project

General

Profile

Actions

Feature #12226

open

Dir.home with valid named user raises ArgumentError on Windows

Added by vais (Vais Salikhov) almost 8 years ago. Updated almost 8 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:74616]

Description

C:\>C:\Ruby\ruby-2.2.4-x64-mingw32\bin\ruby.exe -ve "p Dir.home; p Dir.home('Administrator')"
ruby 2.2.4p230 (2015-12-16 revision 53155) [x64-mingw32]
"C:/Users/Administrator"
-e:1:in `home': user Administrator doesn't exist (ArgumentError)
        from -e:1:in `<main>'

Updated by nobu (Nobuyoshi Nakada) almost 8 years ago

Windows seems not providing the way to know another user's home path without authentication.

Updated by nobu (Nobuyoshi Nakada) almost 8 years ago

  • Tracker changed from Bug to Feature
Actions #3

Updated by nobu (Nobuyoshi Nakada) almost 8 years ago

  • Status changed from Open to Closed

Applied in changeset r54947.


file.c: home dir fall back

  • file.c (rb_home_dir_of): return the default home path if the
    user name is the current user name, on platforms where struct
    pwd is not supported. a temporary measure against
    [Bug #12226].

Updated by nobu (Nobuyoshi Nakada) almost 8 years ago

  • Status changed from Closed to Open
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0