Bug #15244 » dot-names.diff
file.c | ||
---|---|---|
do name = ++p; while (isdirsep(*p));
|
||
e = 0;
|
||
while (*p && *p == '.') p++;
|
||
if (*p && *p == '.') p++; /* Only trim the first leading period */
|
||
while (*p) {
|
||
if (*p == '.' || istrailinggarbage(*p)) {
|
||
#if USE_NTFS
|
spec/ruby/core/file/extname_spec.rb | ||
---|---|---|
File.extname("....").should == ""
|
||
File.extname(".foo.").should == ""
|
||
File.extname("foo.").should == ""
|
||
File.extname("...jpg").should == ".jpg"
|
||
end
|
||
it "returns only the last extension of a file with several dots" do
|