Project

General

Profile

Feature #12226

Dir.home with valid named user raises ArgumentError on Windows

Added by vais (Vais Salikhov) over 3 years ago. Updated over 3 years ago.

Status:
Open
Priority:
Normal
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>'

Associated revisions

Revision f0355ae7
Added by nobu (Nobuyoshi Nakada) over 3 years ago

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].

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

Revision 54947
Added by nobu (Nobuyoshi Nakada) over 3 years ago

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].

Revision 54947
Added by nobu (Nobuyoshi Nakada) over 3 years ago

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].

Revision 54947
Added by nobu (Nobuyoshi Nakada) over 3 years ago

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].

Revision 54947
Added by nobu (Nobuyoshi Nakada) over 3 years ago

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].

History

Updated by nobu (Nobuyoshi Nakada) over 3 years ago

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

Updated by nobu (Nobuyoshi Nakada) over 3 years ago

  • Tracker changed from Bug to Feature
#3

Updated by nobu (Nobuyoshi Nakada) over 3 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) over 3 years ago

  • Status changed from Closed to Open

Also available in: Atom PDF