pxlrbt / filament-excel

Excel Export for Filament Admin Resources
MIT License
355 stars 68 forks source link

Filenames that contain `.` are missing the extension #95

Open pxlrbt opened 1 year ago

pxlrbt commented 1 year ago

This code breaks exports with filenames that contain a dot.

protected function ensureFilenameHasExtension(string $filename): string
{
    return Str::contains($filename, '.')
        ? $filename
        : $filename.'.'.$this->getDefaultExtension();
}