Skip to content

Commit 8bb35ca

Browse files
author
Clemens Mandl
committed
Fixed a bug with multiple Sub-Directories with same name
1 parent c2784c8 commit 8bb35ca

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tools/export/nb/__init__.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,16 @@ def get_netbeans_file_list(file_list):
325325
if cur_dir and prev_dir != cur_dir:
326326
# evaluate all matched items (from current and previous list)
327327
matched = []
328-
for element in dir_list:
329-
if element in prev_dir_list:
330-
matched.append(element)
328+
# Compare the Element in Previous Dir with the Elements in Current Dir
329+
# and add the Differences to the match-List
330+
if len(dir_list) <= len(prev_dir_list):
331+
for idx, element in enumerate(dir_list):
332+
if element == prev_dir_list[idx]:
333+
matched.append(element)
334+
else:
335+
for idx, element in enumerate(prev_dir_list):
336+
if element == dir_list[idx]:
337+
matched.append(element)
331338

332339
# calculate difference between matched and length
333340
diff = dir_depth - len(matched)

0 commit comments

Comments
 (0)