Skip to content

Commit c6d9b22

Browse files
rinxhkupty
authored andcommitted
Fix path_to_ns function (#32)
1 parent 7e3f0f6 commit c6d9b22

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rplugin/python3/acid/pure/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ def path_to_ns(path, stop_paths=None):
1515
m = re.search(stop_path[::-1], path[::-1])
1616
if m:
1717
startpos = len(path) - m.start()
18-
raw_path_list = path[startpos:].replace("_", "-").split('/')[stop_path.count('/') + 1:]
18+
raw_path_list = path[startpos:].replace("_", "-").split('/')
19+
raw_path_list = [x for x in raw_path_list if x]
1920
raw_path_list[-1] = raw_path_list[-1].split('.')[0]
2021
break
2122

0 commit comments

Comments
 (0)