Skip to content

Commit

Permalink
Fix symlink issue
Browse files Browse the repository at this point in the history
It seems that sublime has a little issue with symlinks such that it doesn't detect that the content changed. In order to bypass this, every time I refresh the local database file I recreate the symlink as well. Hackish.. but it works
  • Loading branch information
vrachieru committed Apr 18, 2016
1 parent 2accc69 commit 878fe18
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cheatsheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,6 @@ def saveCheatsheetCommands(self):
json.dump(self.commands, output, sort_keys = True, indent = 2, separators = (',', ': '))

def symlinkCommandsFile(self):
if not os.path.islink(_localCommandsFileSymlink):
os.symlink(_localCommandsFile, _localCommandsFileSymlink)
if os.path.exists(_localCommandsFileSymlink):
os.remove(_localCommandsFileSymlink)
os.symlink(_localCommandsFile, _localCommandsFileSymlink)

0 comments on commit 878fe18

Please sign in to comment.