From b2150b33920efa3c9fbf5f8604108a740abf1cb5 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Mon, 21 Apr 2014 14:05:24 +0000 Subject: [PATCH] * keep original file order --- source/net/filebot/cli/CmdlineOperations.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/net/filebot/cli/CmdlineOperations.java b/source/net/filebot/cli/CmdlineOperations.java index 64058aaa..aa2c607c 100644 --- a/source/net/filebot/cli/CmdlineOperations.java +++ b/source/net/filebot/cli/CmdlineOperations.java @@ -22,6 +22,7 @@ import java.util.AbstractMap.SimpleImmutableEntry; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; import java.util.Locale; @@ -230,7 +231,7 @@ public class CmdlineOperations implements CmdlineInterface { matches.addAll(derivateMatches); // map old files to new paths by applying formatting and validating filenames - Map renameMap = new TreeMap(CASE_INSENSITIVE_PATH); + Map renameMap = new LinkedHashMap(); for (Match match : matches) { File file = match.getValue(); @@ -473,7 +474,7 @@ public class CmdlineOperations implements CmdlineInterface { } // map old files to new paths by applying formatting and validating filenames - Map renameMap = new TreeMap(CASE_INSENSITIVE_PATH); + Map renameMap = new LinkedHashMap(); for (Match match : matches) { File file = match.getValue(); @@ -501,7 +502,7 @@ public class CmdlineOperations implements CmdlineInterface { } // map old files to new paths by applying formatting and validating filenames - Map renameMap = new TreeMap(CASE_INSENSITIVE_PATH); + Map renameMap = new LinkedHashMap(); for (Match it : matches) { File file = it.getValue();