Skip to content

Commit 80b1b25

Browse files
authored
Merge pull request #23 from facelessuser/bugfix/glob-chars
Handle special glob characters in path
2 parents 581e6b0 + 72645c1 commit 80b1b25

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

.dictionary

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ SVG
1111
Twemoji
1212
accessor
1313
dedent
14+
glob
1415
inlined
1516
inlining
1617
macOS

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.1.1
4+
5+
- **FIX**: Properly handle special glob characters in path.
6+
37
## 1.1.0
48

59
- **NEW**: Drop Python 3.6 and officially support 3.10.

materialx/__meta__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,5 +188,5 @@ def parse_version(ver):
188188
return Version(major, minor, micro, release, pre, post, dev)
189189

190190

191-
__version_info__ = Version(1, 1, 0, "final")
191+
__version_info__ = Version(1, 1, 1, "final")
192192
__version__ = __version_info__._get_canonical()

materialx/emoji.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def _patch_index_for_locations(icon_locations):
4040
# Find our icons
4141
for icon_path in icon_locations:
4242
norm_base = icon_path.replace('\\', '/') + '/'
43-
for result in glob.glob(icon_path.replace('\\', '/') + '/**/*.svg', recursive=True):
43+
for result in glob.glob(glob.escape(icon_path.replace('\\', '/')) + '/**/*.svg', recursive=True):
4444
name = ':{}:'.format(result.replace('\\', '/').replace(norm_base, '', 1).replace('/', '-').lstrip('.')[:-4])
4545
if name not in index['emoji'] and name not in index['aliases']:
4646
# Easiest to just store the path and pull it out from the index

0 commit comments

Comments
 (0)