Skip to content

Commit 878fe18

Browse files
committed
Fix symlink issue
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
1 parent 2accc69 commit 878fe18

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cheatsheet.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,6 @@ def saveCheatsheetCommands(self):
107107
json.dump(self.commands, output, sort_keys = True, indent = 2, separators = (',', ': '))
108108

109109
def symlinkCommandsFile(self):
110-
if not os.path.islink(_localCommandsFileSymlink):
111-
os.symlink(_localCommandsFile, _localCommandsFileSymlink)
110+
if os.path.exists(_localCommandsFileSymlink):
111+
os.remove(_localCommandsFileSymlink)
112+
os.symlink(_localCommandsFile, _localCommandsFileSymlink)

0 commit comments

Comments
 (0)