Issue #3356 has been updated by Roger Pack.


I could use this as well (because some File-like classes return an 8.3 filename, some the full filename, so not always is the 8.3 name available), though ffi is or winapi is a good work-around for the present.
----------------------------------------
Feature #3356: Add GetShortPathName to ruby
http://redmine.ruby-lang.org/issues/3356

Author: Christian Höltje
Status: Open
Priority: Normal
Assignee: 
Category: lib
Target version: 
ruby -v: ruby 1.9.1p378 (2010-01-10) [i386-mswin32_80]


=begin
 Hi!
 
 I use Ruby on windows and it would be really useful to have access to GetShortPathName in ruby.
 
 I have a monkey-patch to add Pathname.shortpath (attached) to demonstrate it.  Probably realpath, etc. should take this in to account as well, since in windows, only the shortpath is canonical.
 
 In addition, the shortpath doesn't need to be escaped, so you can use it with backticks (`), etc.
 
 Ciao!
=end



-- 
http://redmine.ruby-lang.org