Skip to content

Commit

Permalink
fix #16 hangs when dotfile returns empty ext
Browse files Browse the repository at this point in the history
  • Loading branch information
braver committed Aug 20, 2017
1 parent 5b616a4 commit afcf2ee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions SideBar.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,10 @@ def run(self, paths):
leaf = os.path.split(source)[1]

name, ext = os.path.splitext(leaf)
while '.' in name:
name, _ext = os.path.splitext(name)
ext = _ext + ext
if ext is not '':
while '.' in name:
name, _ext = os.path.splitext(name)
ext = _ext + ext

initial_text = name + ' (Copy)' + ext
input_panel = self.window.show_input_panel(
Expand Down

0 comments on commit afcf2ee

Please sign in to comment.