mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-05-04 03:40:32 +00:00
dc033a8d5b
* fix(FilePath): getBaseName crashes on hidden files like .bashrc
For hidden files the leading dot caused contains(".") to pass, then
lastIndexOf(".") returned 0, and substring(0, 0) produced an empty
string. FilePath.of("") throws IllegalArgumentException.
Replacing the contains check with lastIndexOf on the filename and
treating lastDot <= 0 as no-extension fixes both the no-dot and
hidden-file cases.
* fix(FilePath): throw IllegalStateException for dotfile in getBaseName
---------
Co-authored-by: Tejas <tejasae-afk@users.noreply.github.com>