Index: channels/file.py ================================================================== --- channels/file.py +++ channels/file.py @@ -119,12 +119,11 @@ def scan_dirs(self): self.categories = [] # add main directory for main in self.dir: - main = re.sub("^~", os.environ.get("HOME")) - main = re.sub("[$]([A-Z_]+)", lambda m: os.environ.get(m.group(1)), main) + main = os.path.expanduser(os.path.expandvars(main)) if os.path.exists(main): self.categories.append(main) # prepare subdirectories list sub = []