mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-23 08:18:52 -05:00
Fix preview/formatting issues with String objects that are paths and not just filenames
@see https://www.filebot.net/forums/viewtopic.php?f=5&t=4500
This commit is contained in:
parent
e7a4140426
commit
a56f4d25ad
@ -32,11 +32,11 @@ class FileNameFormatter implements MatchFormatter {
|
||||
|
||||
if (value instanceof FileInfo) {
|
||||
FileInfo file = (FileInfo) value;
|
||||
return extension ? file.getPath() : file.getName();
|
||||
return extension ? file.toFile().getName() : file.getName();
|
||||
}
|
||||
|
||||
if (value instanceof String) {
|
||||
return extension ? value.toString() : getNameWithoutExtension(new File(value.toString()).getName());
|
||||
return extension ? value.toString() : getNameWithoutExtension(value.toString());
|
||||
}
|
||||
|
||||
// cannot format value
|
||||
|
Loading…
Reference in New Issue
Block a user