From c6218d0dbdb4b56e9c1e62b824dc7f31ba305827 Mon Sep 17 00:00:00 2001 From: louisdachet Date: Thu, 15 Sep 2022 16:17:34 +0200 Subject: [PATCH] fix(svg list): add parent directory name to icon name if it's in a child directory Add parent directory to be able to have variant of some icons --- bin/fontify.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/fontify.dart b/bin/fontify.dart index d67f8e2..c818ba9 100644 --- a/bin/fontify.dart +++ b/bin/fontify.dart @@ -69,7 +69,8 @@ void _run(CliArguments parsedArgs) { final svgMap = { for (final f in svgFileList) - p.basenameWithoutExtension(f.path): File(f.path).readAsStringSync(), + '${p.basenameWithoutExtension(f.path)}${(p.basename(p.dirname(f.path))) != p.basename(parsedArgs.svgDir.path) ? '_${p.basename(p.dirname(f.path))}' : ''}': + File(f.path).readAsStringSync(), }; final otfResult = svgToOtf(