1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-24 08:48:51 -05:00

We can only reveal / select one file per revealed folder

This commit is contained in:
Reinhard Pointner 2016-08-17 03:36:01 +08:00
parent fc73de25d7
commit 049d84fa6b

View File

@ -2,6 +2,7 @@ package net.filebot;
import static java.util.Arrays.*; import static java.util.Arrays.*;
import static java.util.Collections.*; import static java.util.Collections.*;
import static java.util.stream.Collectors.*;
import static net.filebot.Logging.*; import static net.filebot.Logging.*;
import static net.filebot.Settings.*; import static net.filebot.Settings.*;
import static net.filebot.similarity.Normalization.*; import static net.filebot.similarity.Normalization.*;
@ -56,9 +57,9 @@ public class UserFiles {
public static void revealFiles(Collection<File> files) { public static void revealFiles(Collection<File> files) {
if (isMacApp()) { if (isMacApp()) {
files.forEach(f -> { files.stream().collect(groupingBy(File::getParentFile)).forEach((parent, children) -> {
try { try {
FileManager.revealInFinder(f); FileManager.revealInFinder(children.get(children.size() - 1));
} catch (Exception e) { } catch (Exception e) {
debug.log(Level.WARNING, e::toString); debug.log(Level.WARNING, e::toString);
} }