Skip to content

Commit

Permalink
Fix: config/.scc/devices folder not being created. Fixes #297
Browse files Browse the repository at this point in the history
  • Loading branch information
kozec committed Dec 25, 2017
1 parent ff8b7d2 commit 87a6ab7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scc/gui/global_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,9 @@ def on_btRemoveController_clicked(self, *a):
def load_controllers(self, *a):
lstControllers = self.builder.get_object("lstControllers")
lstControllers.clear()
devices_path = os.path.join(get_config_path(), "devices")
if not os.path.exists(devices_path):
os.makedirs(os.path.join(get_config_path(), "devices"))
for filename in os.listdir(os.path.join(get_config_path(), "devices")):
if filename.endswith(".json"):
if filename.startswith("hid-"):
Expand Down

0 comments on commit 87a6ab7

Please sign in to comment.