From 9ab1f33ed1e05f9fd0f38d2c332a86c068cdc832 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Tue, 6 Dec 2016 00:46:47 +0900 Subject: [PATCH] FAIL *facepalm* --- source/net/filebot/util/FileUtilities.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/net/filebot/util/FileUtilities.java b/source/net/filebot/util/FileUtilities.java index 3ec24f03..512e8e06 100644 --- a/source/net/filebot/util/FileUtilities.java +++ b/source/net/filebot/util/FileUtilities.java @@ -320,6 +320,10 @@ public final class FileUtilities { public static String getName(File file) { if (file == null) return null; + + if (file.isDirectory()) + return file.getName(); + if (file.getName().isEmpty() || UNC_PREFIX.equals(file.getParent())) return getFolderName(file);