Skip to content

Commit 66a7edd

Browse files
committed
Fix encode_shader.py failing when path contains dots
1 parent 2c417e0 commit 66a7edd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/encode_shader.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env python3
2+
from pathlib import Path
23

34
def print_help():
45
print("Usage:")
@@ -56,7 +57,7 @@ def write_string_footer(fd):
5657
sys.exit()
5758

5859
file_in_name = sys.argv[2]
59-
string_name = file_in_name.split(".")[0].split("/")[-1]
60+
string_name = Path(file_in_name).stem
6061

6162
fd_out.write("// clang-format off\n")
6263
write_string_header(string_name, fd_out)

0 commit comments

Comments
 (0)