Project

General

Profile

Bug #15244 ยป dot-names.diff

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

View differences:

file.c
4686 4686
	do name = ++p; while (isdirsep(*p));
4687 4687

  
4688 4688
    e = 0;
4689
    while (*p && *p == '.') p++;
4689
    if (*p && *p == '.') p++;    /* Only trim the first leading period */
4690 4690
    while (*p) {
4691 4691
	if (*p == '.' || istrailinggarbage(*p)) {
4692 4692
#if USE_NTFS
spec/ruby/core/file/extname_spec.rb
22 22
    File.extname("....").should ==  ""
23 23
    File.extname(".foo.").should ==  ""
24 24
    File.extname("foo.").should ==  ""
25
    File.extname("...jpg").should == ".jpg"
25 26
  end
26 27

  
27 28
  it "returns only the last extension of a file with several dots" do