mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-10-18 21:09:18 +00:00
Fix base name bug
This commit is contained in:
1 parent
e81f847b0a
commit
bbcf9800ed
1 file changed
+3
-2
@@ -120,10 +120,11 @@ public final class FilePath {
|
||||
}
|
||||
|
||||
public FilePath getBaseName() {
|
||||
var split = value.lastIndexOf(".");
|
||||
if (split == -1) {
|
||||
if (!getFileName().contains(".")) {
|
||||
return this;
|
||||
}
|
||||
|
||||
var split = value.lastIndexOf(".");
|
||||
return FilePath.of(value.substring(0, split));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user