Skip to content

Commit

Permalink
fix(gridutil): support grids with groups and sub-folders
Browse files Browse the repository at this point in the history
  • Loading branch information
mostaphaRoudsari committed Mar 26, 2022
1 parent 12bd8ce commit 863ae7a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions honeybee_radiance_folder/gridutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ def restore_original_distribution(

for f in data:
out_file = os.path.join(output_folder, '%s.%s' % (f['identifier'], extension))
# ensure the new folder is created. in case the identifier has a subfolder
parent_folder = os.path.dirname(out_file)
if not os.path.isdir(parent_folder):
os.mkdir(parent_folder)
with open(out_file, 'w') as outf:
for src_info in f['dist_info']:
src_file = os.path.join(
Expand Down

0 comments on commit 863ae7a

Please sign in to comment.