From 0a7e281deab083c5d8db01e2356a71886da3b378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=F8=EDk?= Date: Sat, 10 Aug 2013 20:31:25 +0200 Subject: [PATCH] Issue #314 Better name to filename conversion --- trunk/src/com/jpexs/decompiler/flash/helpers/Helper.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/trunk/src/com/jpexs/decompiler/flash/helpers/Helper.java b/trunk/src/com/jpexs/decompiler/flash/helpers/Helper.java index 71089a1ed..8d42a55b1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/helpers/Helper.java +++ b/trunk/src/com/jpexs/decompiler/flash/helpers/Helper.java @@ -436,6 +436,12 @@ public class Helper { } } str = sb.toString(); + if (str.endsWith(" ")) { + str = str.substring(0, str.length() - 1) + "%20"; + } + if (str.endsWith(".")) { + str = str.substring(0, str.length() - 1) + "%2E"; + } str = "." + str + "."; for (String inv : invalidFilenamesParts) { str = Pattern.compile("\\." + Pattern.quote(inv) + "\\.", Pattern.CASE_INSENSITIVE).matcher(str).replaceAll("._" + inv + ".");