Skip to content

Commit

Permalink
Fix issue with filename with ending dot, but no extension #1671
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertvanderHulst committed Jan 13, 2025
1 parent 4c0cb6f commit d5cea0f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Runtime/XSharp.Core/RDD/RDDSupport.prg
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,12 @@ CLASS DbOpenInfo
RETURN FileName + Extension
END GET
SET
SELF:FileName :=Path.ChangeExtension(value,null)
SELF:Extension :=Path.GetExtension( value )
SELF:FileName := Path.ChangeExtension(value,null)
SELF:Extension := Path.GetExtension( value )
// Make sure that a filename that ends with a '.' like "Test." does not get changed to "Test.Dbf"
if String.IsNullOrEmpty(SELF:Extension) .and. value:EndsWith(".")
SELF:Extension := "."
ENDIF
END SET
END PROPERTY

Expand Down

0 comments on commit d5cea0f

Please sign in to comment.