[Win32utils-devel] [ win32utils-Bugs-28499 ] File.dirname should not consider trailing slashes

noreply at rubyforge.org noreply at rubyforge.org
Wed Aug 25 00:47:39 EDT 2010


Bugs item #28499, was opened at 2010-08-24 21:47
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=411&aid=28499&group_id=85

Category: win32-file
Group: Code
Status: Open
Resolution: None
Priority: 3
Submitted By: Daniel Berger (djberg96)
Assigned to: Nobody (None)
Summary: File.dirname should not consider trailing slashes

Initial Comment:
The PathRemoveFileSpec function says it removes the trailing file name and backslash from a path if present. However, this doesn't seem to be the case with the wide character functions:

require 'win32/file'

irb(main):005:0> File.dirname("//foo/bar/baz")
=> "\\foo\bar"
irb(main):006:0> File.dirname("//foo/bar/baz/")
=> "\\foo\bar\baz"

That is not correct.

Regards

Dan (me)

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=411&aid=28499&group_id=85


More information about the win32utils-devel mailing list