From 8f4875f4d5248c8309f132a702b266015d26c93c Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Mon, 8 Jul 2024 12:24:52 -0700 Subject: [PATCH] AnimateLibraryExporter: fix wrong case used for package directory names when generating classes (closes #31) Co-authored-by: barisyild --- src/swf/exporters/AnimateLibraryExporter.hx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/swf/exporters/AnimateLibraryExporter.hx b/src/swf/exporters/AnimateLibraryExporter.hx index f0e420c..02b0a55 100644 --- a/src/swf/exporters/AnimateLibraryExporter.hx +++ b/src/swf/exporters/AnimateLibraryExporter.hx @@ -1167,6 +1167,7 @@ class AnimateLibraryExporter if (templateData != null && Reflect.hasField(symbol, "className") && symbol.className != null) { var className:String = symbol.className; + className = SymbolUtils.formatClassName(className, prefix); var hidden = false; var name = className; @@ -1185,8 +1186,6 @@ class AnimateLibraryExporter name = className.substr(lastIndexOfPeriod + 1); } - name = SymbolUtils.formatClassName(name, prefix); - // TODO: Is this right? Is this hard-coded in Flash Player for internal classes? if (packageName == "privatePkg") continue; @@ -1289,7 +1288,7 @@ class AnimateLibraryExporter var template = new Template(templateData); - var templateFile = new Asset("", Path.combine(Path.combine(targetPath, Path.directory(symbol.className.split(".").join("/"))), name + ".hx"), + var templateFile = new Asset("", Path.combine(Path.combine(targetPath, Path.directory(className.split(".").join("/"))), name + ".hx"), cast AssetType.TEMPLATE); templateFile.embed = false; templateFile.data = template.execute(context);