Skip to content

Commit

Permalink
Bugfix regression: following link creates new note because note is no…
Browse files Browse the repository at this point in the history
…t fouond

No trailing slash in directory config
No os.path.join --> note cannot be found because the slash is missing. os.path.join to the rescue.
  • Loading branch information
Rene Schallner committed Oct 29, 2017
1 parent bb38e47 commit 56b1bb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sublime_zk.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ def run(self, edit):
self.view.sel().add(oldLocation)

# search for file starting with text between the brackets (usually the ID)
the_file = directory+selected_text + '*'
the_file = os.path.join(directory, selected_text + '*')
candidates = glob.glob(the_file)

print('Candidates: for glob {} : {}'.format(the_file, candidates))
if len(candidates) > 0:
the_file = candidates[0]
#open the existing note.
Expand Down

0 comments on commit 56b1bb8

Please sign in to comment.