Skip to content

Commit cc0f8dc

Browse files
committed
Fix TWBT file replacement handling (fixes #159)
Bump version number to 0.13b
1 parent 6ea5e60 commit cc0f8dc

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

core/graphics.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,14 @@ def install_graphics(pack):
161161
# TwbT file replacements
162162
if 'TWBT' in lnp.settings.printmode:
163163
for folder in ['graphics', 'objects']:
164-
twbt_folder = paths.get(folder, '..', 'twbt_'+folder)
165-
target_folder = paths.get(folder)
164+
twbt_folder = paths.get('graphics', pack, 'raw', 'twbt_'+folder)
165+
target_folder = paths.get('df', 'raw', folder)
166+
166167
for path, _, files in os.walk(twbt_folder):
167168
for f in files:
168169
twbt_f = os.path.join(path, f)
169-
target_f = twbt_f.replace(twbt_folder, target_folder)
170+
target_f = os.path.join(target_folder, os.path.relpath(
171+
twbt_f, twbt_folder))
170172
shutil.copyfile(twbt_f, target_f)
171173

172174
except:

core/lnp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from .json_config import JSONConfiguration
1111

12-
VERSION = '0.13a'
12+
VERSION = '0.13b'
1313

1414
# pylint:disable=too-many-instance-attributes
1515

0 commit comments

Comments
 (0)