From 3fd7d346479114867fcf53cd0550a6cf38f38523 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Thu, 14 Apr 2016 09:32:01 +0000 Subject: [PATCH] Improved structure root detection --- source/net/filebot/ui/rename/ExpressionFormatter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/net/filebot/ui/rename/ExpressionFormatter.java b/source/net/filebot/ui/rename/ExpressionFormatter.java index a1a07b07..62787210 100644 --- a/source/net/filebot/ui/rename/ExpressionFormatter.java +++ b/source/net/filebot/ui/rename/ExpressionFormatter.java @@ -78,6 +78,9 @@ class ExpressionFormatter implements MatchFormatter { File structureRoot = getStructureRoot(source); if (structureRoot != null) { for (File f : listPath(parent)) { + if (isVolumeRoot(structureRoot)) { + break; + } if (isStructureRoot(f)) { structureRoot = structureRoot.getParentFile(); }