Skip to content

Commit

Permalink
Avoid duplicates being added to sync selection
Browse files Browse the repository at this point in the history
Signed-off-by: Himanshu Chauhan <[email protected]>
  • Loading branch information
hschauhan committed Jan 1, 2016
1 parent 6be97ea commit b905c34
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions GoSync/GoSyncModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,9 @@ def SetSyncSelection(self, folder):
for d in self.sync_selection:
if d[0] == 'root':
self.sync_selection = []
for d in self.sync_selection:
if d[0] == folder.GetPath() and d[1] == folder.GetId():
return
self.sync_selection.append([folder.GetPath(), folder.GetId()])
self.config_dict['Sync Selection'] = self.sync_selection
self.SaveConfig()
Expand Down

0 comments on commit b905c34

Please sign in to comment.