Project

General

Profile

Bug #15244 » dot-names.diff

rushsteve1 (Steven vanZyl), 08/02/2019 03:15 PM

View differences:

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
(1-1/2)